From c0ae5f718dc712085163717bf36f0bf3a639d470 Mon Sep 17 00:00:00 2001 From: billy rennekamp Date: Sun, 2 May 2021 11:53:39 +0200 Subject: [PATCH] proxy pattern working --- .gitignore | 1 + build/contracts/Doneth.json | 37387 ++++++++++++++++ build/contracts/ERC20.json | 36423 +++++++++++++++ build/contracts/ERC20Basic.json | 36328 +++++++++++++++ build/contracts/Migrations.json | 1395 + build/contracts/Ownable.json | 36284 +++++++++++++++ build/contracts/ProxyFactory.json | 1309 + build/contracts/SafeMath.json | 36249 +++++++++++++++ contracts/Doneth.sol | 55 +- contracts/Factory.sol | 72 + contracts/Proxy.sol | 35 + contracts/ProxyFactory.sol | 80 + ...deploy_contracts.js => 2_deploy_doneth.js} | 0 migrations/3_deploy_proxy_factory.js | 5 + package.json | 2 + src/components/Deploy.vue | 69 +- src/store/actions.js | 5 + src/store/index.js | 1 + src/store/mutations.js | 3 + truffle.js | 122 +- yarn.lock | 547 +- 21 files changed, 186323 insertions(+), 49 deletions(-) create mode 100644 build/contracts/Doneth.json create mode 100644 build/contracts/ERC20.json create mode 100644 build/contracts/ERC20Basic.json create mode 100644 build/contracts/Migrations.json create mode 100644 build/contracts/Ownable.json create mode 100644 build/contracts/ProxyFactory.json create mode 100644 build/contracts/SafeMath.json create mode 100644 contracts/Factory.sol create mode 100644 contracts/Proxy.sol create mode 100644 contracts/ProxyFactory.sol rename migrations/{2_deploy_contracts.js => 2_deploy_doneth.js} (100%) create mode 100644 migrations/3_deploy_proxy_factory.js diff --git a/.gitignore b/.gitignore index 541a820f..1b288ed6 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ yarn-error.log* *.ntvs* *.njsproj *.sln +.env \ No newline at end of file diff --git a/build/contracts/Doneth.json b/build/contracts/Doneth.json new file mode 100644 index 00000000..834a2247 --- /dev/null +++ b/build/contracts/Doneth.json @@ -0,0 +1,37387 @@ +{ + "contractName": "Doneth", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "genesisBlockNumber", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "members", + "outputs": [ + { + "name": "exists", + "type": "bool" + }, + { + "name": "admin", + "type": "bool" + }, + { + "name": "shares", + "type": "uint256" + }, + { + "name": "withdrawn", + "type": "uint256" + }, + { + "name": "memberName", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "initialized", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "tokenKeys", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalShares", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalWithdrawn", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "sharedExpenseWithdrawn", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "sharedExpense", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "PRECISION", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "address" + } + ], + "name": "tokens", + "outputs": [ + { + "name": "exists", + "type": "bool" + }, + { + "name": "totalWithdrawn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "", + "type": "uint256" + } + ], + "name": "memberKeys", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalWithdrawn", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenWithdraw", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "addedShares", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalShares", + "type": "uint256" + } + ], + "name": "AddShare", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "removedShares", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalShares", + "type": "uint256" + } + ], + "name": "RemoveShare", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "oldValue", + "type": "bool" + }, + { + "indexed": false, + "name": "newValue", + "type": "bool" + } + ], + "name": "ChangePrivilege", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldValue", + "type": "string" + }, + { + "indexed": false, + "name": "newValue", + "type": "string" + } + ], + "name": "ChangeContractName", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "oldValue", + "type": "string" + }, + { + "indexed": false, + "name": "newValue", + "type": "string" + } + ], + "name": "ChangeMemberName", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "contractBalance", + "type": "uint256" + }, + { + "indexed": false, + "name": "oldValue", + "type": "uint256" + }, + { + "indexed": false, + "name": "newValue", + "type": "uint256" + } + ], + "name": "ChangeSharedExpense", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "type": "uint256" + } + ], + "name": "WithdrawSharedExpense", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_contractName", + "type": "string" + }, + { + "name": "_founderName", + "type": "string" + } + ], + "name": "init", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getMemberCount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "key", + "type": "uint256" + } + ], + "name": "getMemberAtKey", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getBalance", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getContractInfo", + "outputs": [ + { + "name": "name", + "type": "string" + }, + { + "name": "owner", + "type": "address" + }, + { + "name": "genesisBlockNumber", + "type": "uint256" + }, + { + "name": "totalShares", + "type": "uint256" + }, + { + "name": "totalWithdrawn", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_address", + "type": "address" + } + ], + "name": "returnMember", + "outputs": [ + { + "name": "admin", + "type": "bool" + }, + { + "name": "shares", + "type": "uint256" + }, + { + "name": "withdrawn", + "type": "uint256" + }, + { + "name": "memberName", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "token", + "type": "address" + } + ], + "name": "checkERC20Balance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "shares", + "type": "uint256" + }, + { + "name": "admin", + "type": "bool" + }, + { + "name": "memberName", + "type": "string" + } + ], + "name": "addMember", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "shares", + "type": "uint256" + }, + { + "name": "isAdmin", + "type": "bool" + }, + { + "name": "name", + "type": "string" + } + ], + "name": "updateMember", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "newName", + "type": "string" + } + ], + "name": "changeMemberName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "newValue", + "type": "bool" + } + ], + "name": "changeAdminPrivilege", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newName", + "type": "string" + } + ], + "name": "changeContractName", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "newAllocation", + "type": "uint256" + } + ], + "name": "changeSharedExpenseAllocation", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "allocateShares", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "addShare", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "amount", + "type": "uint256" + } + ], + "name": "removeShare", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "amount", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "amount", + "type": "uint256" + }, + { + "name": "token", + "type": "address" + } + ], + "name": "withdrawToken", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "amount", + "type": "uint256" + }, + { + "name": "to", + "type": "address" + } + ], + "name": "withdrawSharedExpense", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "calculateTotalWithdrawableAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + }, + { + "name": "token", + "type": "address" + } + ], + "name": "calculateTotalWithdrawableTokenAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "a", + "type": "uint256" + }, + { + "name": "b", + "type": "uint256" + }, + { + "name": "c", + "type": "uint256" + } + ], + "name": "delegatePercent", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"genesisBlockNumber\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"members\",\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\"},{\"name\":\"admin\",\"type\":\"bool\"},{\"name\":\"shares\",\"type\":\"uint256\"},{\"name\":\"withdrawn\",\"type\":\"uint256\"},{\"name\":\"memberName\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"changeMemberName\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getBalance\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newAllocation\",\"type\":\"uint256\"}],\"name\":\"changeSharedExpenseAllocation\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawSharedExpense\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"calculateTotalWithdrawableTokenAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"tokenKeys\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"}],\"name\":\"calculateTotalWithdrawableAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalShares\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"calculateTotalExpenseWithdrawableAmount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalWithdrawn\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"addShare\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\"},{\"name\":\"admin\",\"type\":\"bool\"},{\"name\":\"memberName\",\"type\":\"string\"}],\"name\":\"addMember\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sharedExpenseWithdrawn\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_contractName\",\"type\":\"string\"},{\"name\":\"_founderName\",\"type\":\"string\"}],\"name\":\"init\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getContractInfo\",\"outputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"owner\",\"type\":\"address\"},{\"name\":\"genesisBlockNumber\",\"type\":\"uint256\"},{\"name\":\"totalShares\",\"type\":\"uint256\"},{\"name\":\"totalWithdrawn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"a\",\"type\":\"uint256\"},{\"name\":\"b\",\"type\":\"uint256\"},{\"name\":\"c\",\"type\":\"uint256\"}],\"name\":\"delegatePercent\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"newValue\",\"type\":\"bool\"}],\"name\":\"changeAdminPrivilege\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"returnMember\",\"outputs\":[{\"name\":\"admin\",\"type\":\"bool\"},{\"name\":\"shares\",\"type\":\"uint256\"},{\"name\":\"withdrawn\",\"type\":\"uint256\"},{\"name\":\"memberName\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"allocateShares\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"getMemberCount\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"checkERC20Balance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"sharedExpense\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PRECISION\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newName\",\"type\":\"string\"}],\"name\":\"changeContractName\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"key\",\"type\":\"uint256\"}],\"name\":\"getMemberAtKey\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\"},{\"name\":\"token\",\"type\":\"address\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"removeShare\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"address\"}],\"name\":\"tokens\",\"outputs\":[{\"name\":\"exists\",\"type\":\"bool\"},{\"name\":\"totalWithdrawn\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"memberKeys\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"who\",\"type\":\"address\"},{\"name\":\"shares\",\"type\":\"uint256\"},{\"name\":\"isAdmin\",\"type\":\"bool\"},{\"name\":\"name\",\"type\":\"string\"}],\"name\":\"updateMember\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newTotalWithdrawn\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"token\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenWithdraw\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"addedShares\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newTotalShares\",\"type\":\"uint256\"}],\"name\":\"AddShare\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"removedShares\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newTotalShares\",\"type\":\"uint256\"}],\"name\":\"RemoveShare\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"oldValue\",\"type\":\"bool\"},{\"indexed\":false,\"name\":\"newValue\",\"type\":\"bool\"}],\"name\":\"ChangePrivilege\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"oldValue\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"newValue\",\"type\":\"string\"}],\"name\":\"ChangeContractName\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"who\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"oldValue\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"newValue\",\"type\":\"string\"}],\"name\":\"ChangeMemberName\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"contractBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"oldValue\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newValue\",\"type\":\"uint256\"}],\"name\":\"ChangeSharedExpense\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"value\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"newSharedExpenseWithdrawn\",\"type\":\"uint256\"}],\"name\":\"WithdrawSharedExpense\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol\":\"Doneth\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol\":{\"keccak256\":\"0xf4cee83d417df0c8d96b5a2c651f061dcec6f27d427f7c1790649772774abdb8\",\"urls\":[\"bzzr://b2a7821b45d082849046709df4c0f691d76d3d1def45d6ba9eb085764fb482cf\"]}},\"version\":1}", + "bytecode": "0x6080604052326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613c71806100536000396000f3006080604052600436106101cd576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630356fe3a1461023a57806306fdde031461026557806308ae4b0c146102f55780630d6d1437146103d557806312065fe01461045e5780631468fc2614610489578063158ef93e146104b657806324e2ca92146104e55780632e1a7d4d146105325780632f0ae5131461055f578063346692b7146105d6578063389435e8146106435780633a98ef391461069a5780634a914e8c146106c55780634b319713146106f057806350f4f9f81461071b5780635ea40983146107685780636e2fd470146108075780637029144c146108325780637cc1f867146108e15780637d22f431146109b957806380056b5b14610a0e57806385dcbb5a14610a5d5780638da5cb5b14610b325780638e2a647014610b89578063997072f714610bd65780639b3bc6fb14610c015780639d21328f14610c58578063aaf5eb6814610c83578063ad3cd88314610cae578063aec8fae814610d17578063be4b177214610d84578063c06474e014610dd1578063e486033914610e1e578063f2fde38b14610e80578063f504b08914610ec3578063fac2548b14610f30575b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1005b34801561024657600080fd5b5061024f610fcf565b6040518082815260200191505060405180910390f35b34801561027157600080fd5b5061027a610fd5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ba57808201518184015260208101905061029f565b50505050905090810190601f1680156102e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561030157600080fd5b50610336600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611073565b60405180861515151581526020018515151515815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561039657808201518184015260208101905061037b565b50505050905090810190601f1680156103c35780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b3480156103e157600080fd5b5061045c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061115b565b005b34801561046a57600080fd5b506104736114a9565b6040518082815260200191505060405180910390f35b34801561049557600080fd5b506104b4600480360381019080803590602001909291905050506114c8565b005b3480156104c257600080fd5b506104cb61162b565b604051808215151515815260200191505060405180910390f35b3480156104f157600080fd5b5061053060048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061163e565b005b34801561053e57600080fd5b5061055d60048036038101908080359060200190929190505050611815565b005b34801561056b57600080fd5b506105c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a56565b6040518082815260200191505060405180910390f35b3480156105e257600080fd5b5061060160048036038101908080359060200190929190505050611b54565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561064f57600080fd5b50610684600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b92565b6040518082815260200191505060405180910390f35b3480156106a657600080fd5b506106af611ce9565b6040518082815260200191505060405180910390f35b3480156106d157600080fd5b506106da611cef565b6040518082815260200191505060405180910390f35b3480156106fc57600080fd5b50610705611d0d565b6040518082815260200191505060405180910390f35b34801561072757600080fd5b50610766600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d13565b005b34801561077457600080fd5b50610805600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050611f93565b005b34801561081357600080fd5b5061081c61220d565b6040518082815260200191505060405180910390f35b34801561083e57600080fd5b506108df600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050612213565b005b3480156108ed57600080fd5b506108f66125ef565b60405180806020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001838152602001828103825287818151815260200191508051906020019080838360005b8381101561097a57808201518184015260208101905061095f565b50505050905090810190601f1680156109a75780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b3480156109c557600080fd5b506109f8600480360381019080803590602001909291908035906020019092919080359060200190929190505050612610565b6040518082815260200191505060405180910390f35b348015610a1a57600080fd5b50610a5b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050612630565b005b348015610a6957600080fd5b50610a9e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061280b565b604051808515151515815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610af4578082015181840152602081019050610ad9565b50505050905090810190601f168015610b215780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610b3e57600080fd5b50610b476129d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610b9557600080fd5b50610bd4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129fc565b005b348015610be257600080fd5b50610beb612bac565b6040518082815260200191505060405180910390f35b348015610c0d57600080fd5b50610c42600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612bb9565b6040518082815260200191505060405180910390f35b348015610c6457600080fd5b50610c6d612c98565b6040518082815260200191505060405180910390f35b348015610c8f57600080fd5b50610c98612c9e565b6040518082815260200191505060405180910390f35b348015610cba57600080fd5b50610d15600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050612ca3565b005b348015610d2357600080fd5b50610d4260048036038101908080359060200190929190505050612ea7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d9057600080fd5b50610dcf60048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612eea565b005b348015610ddd57600080fd5b50610e1c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613370565b005b348015610e2a57600080fd5b50610e5f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135f0565b60405180831515151581526020018281526020019250505060405180910390f35b348015610e8c57600080fd5b50610ec1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613621565b005b348015610ecf57600080fd5b50610eee6004803603810190808035906020019092919050505061374d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610f3c57600080fd5b50610fcd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061378b565b005b60045481565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561106b5780601f106110405761010080835404028352916020019161106b565b820191906000526020600020905b81548152906001019060200180831161104e57829003601f168201915b505050505081565b60076020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff1690806001015490806002015490806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111515780601f1061112657610100808354040283529160200191611151565b820191906000526020600020905b81548152906001019060200180831161113457829003601f168201915b5050505050905085565b81600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615156111b757600080fd5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561124057506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b80156112995750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b156112a357600080fd5b6015825111156112b257600080fd5b7f154ad3f744d3641de12f5e012773b0126c47d1ffda727e5a61a2e6db8bb2cb5583600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030184604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156113d65780601f106113ab576101008083540402835291602001916113d6565b820191906000526020600020905b8154815290600101906020018083116113b957829003601f168201915b5050838103825284818151815260200191508051906020019080838360005b838110156114105780820151818401526020810190506113f5565b50505050905090810190601f16801561143d5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a181600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030190805190602001906114a3929190613aec565b50505050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061156f57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561157a57600080fd5b60065481101561158957600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16316115b660065483613a2990919063ffffffff16565b11156115c157600080fd5b7f5b3ea9617f529540e1c3e0beb0e01c060418c2d1fe48d369afe3d47beaa037cf3073ffffffffffffffffffffffffffffffffffffffff16316005548360405180848152602001838152602001828152602001935050505060405180910390a18060058190555050565b600060149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156116e85750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b156116f257600080fd5b6116fa611cef565b82111561170657600080fd5b61171b82600654613a4290919063ffffffff16565b6006819055508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611767573d6000803e3d6000fd5b507f223162e752821eb7bd44782f73723defb6e3a087a9afc4d3d4af13783f7b6aca338284600654604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a15050565b600033600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561187357600080fd5b61187c33611b92565b91506118d3600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015483613a2990919063ffffffff16565b8311156118df57600080fd5b61193483600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154613a4290919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555061198f83600354613a4290919063ffffffff16565b6003819055503373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156119db573d6000803e3d6000fd5b507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5683384600354604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b6000806000806000611abb600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154611aad88612bb9565b613a4290919063ffffffff16565b9350611ad5600254601286613a609092919063ffffffff16565b9250611b2c600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015484613a9e90919063ffffffff16565b9150611b456012600a0a83613ad190919063ffffffff16565b90508094505050505092915050565b600a81815481101515611b6357fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600085600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515611bf657600080fd5b611c226003543073ffffffffffffffffffffffffffffffffffffffff1631613a4290919063ffffffff16565b9450611c3960055486613a2990919063ffffffff16565b9450611c5060065486613a4290919063ffffffff16565b9450611c6a600254601287613a609092919063ffffffff16565b9350611cc1600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015485613a9e90919063ffffffff16565b9250611cda6012600a0a84613ad190919063ffffffff16565b91508195505050505050919050565b60025481565b6000611d08600654600554613a2990919063ffffffff16565b905090565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611dbd5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b15611dc757600080fd5b81600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515611e2357600080fd5b611e3882600254613a4290919063ffffffff16565b600281905550611e9382600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a4290919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f0d0d4d1bc5a254e66ec692f9d1a4452fed4b59a3a1ba48b1a991838e5c7c4b8a8383600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b611f9b613b6c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156120455750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b1561204f57600080fd5b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156120a957600080fd5b6015825111156120b857600080fd5b60018160000190151590811515815250508281602001901515908115158152505081816080018190525080600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160010155606082015181600201556080820151816003019080519060200190612192929190613ba0565b5090505060088590806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506122068585611d13565b5050505050565b60065481565b61221b613b6c565b600060149054906101000a900460ff161515156122a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f414c524541445920494e495449414c495a45440000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360048190555060158351111561231157600080fd5b60158251111561232057600080fd5b8260019080519060200190612336929190613aec565b506001816000019015159081151581525050600181602001901515908115158152505081816080018190525080600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160010155606082015181600201556080820151816003019080519060200190612412929190613ba0565b5090505060083290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506124926001600254613a4290919063ffffffff16565b6002819055506124ee6001600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a4290919063ffffffff16565b600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f0d0d4d1bc5a254e66ec692f9d1a4452fed4b59a3a1ba48b1a991838e5c7c4b8a326001600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b60606000806000808484848484849450945094509450945094509091929394565b6000612627838386613a609092919063ffffffff16565b90509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156126da5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b156126e457600080fd5b7eb763075216b1778fecb2719c6d2040ed88fdbe6092a9597de5df9d175c968a82600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff1683604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018315151515815260200182151515158152602001935050505060405180910390a180600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160016101000a81548160ff0219169083151502179055505050565b6000806000606061281a613b6c565b85600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561287657600080fd5b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060a060405190810160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900460ff161515151581526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129a45780601f10612979576101008083540402835291602001916129a4565b820191906000526020600020905b81548152906001019060200180831161298757829003601f168201915b50505050508152505091508160200151826040015183606001518460800151809050955095509550955050509193509193565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015612aa85750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b15612ab257600080fd5b82600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515612b0e57600080fd5b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154915081831415612b6057600080fd5b81831115612b8957612b8484612b7f8486613a2990919063ffffffff16565b611d13565b612ba6565b612ba584612ba08585613a2990919063ffffffff16565b613370565b5b50505050565b6000600880549050905090565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612c5657600080fd5b505af1158015612c6a573d6000803e3d6000fd5b505050506040513d6020811015612c8057600080fd5b81019080805190602001909291905050509050919050565b60055481565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015612d4d5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b15612d5757600080fd5b601581511115612d6657600080fd5b7f7244709f741ec5f1d637fd5a891de308c779d1023c0f3128595bb88bf571ef88600182604051808060200180602001838103835285818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015612e175780601f10612dec57610100808354040283529160200191612e17565b820191906000526020600020905b815481529060010190602001808311612dfa57829003601f168201915b5050838103825284818151815260200191508051906020019080838360005b83811015612e51578082015181840152602081019050612e36565b50505050905090810190601f168015612e7e5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18060019080519060200190612ea3929190613aec565b5050565b6000600882815481101515612eb857fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600033600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515612f4857600080fd5b612f523384611a56565b9150612fe6600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483613a2990919063ffffffff16565b841115612ff257600080fd5b61308484600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a4290919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061315c84600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a4290919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561324557600080fd5b505af1158015613259573d6000803e3d6000fd5b505050506040513d602081101561326f57600080fd5b8101908080519060200190929190505050507fffdaa1b8f229c4f9a0c79b712224a2ad8d3aa3c483c23a125f4b9c179870938d338585600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a150505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561341a5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b1561342457600080fd5b81600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561348057600080fd5b61349582600254613a2990919063ffffffff16565b6002819055506134f082600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a2990919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f67d4e98c6b70fdfbb7305797bbb30889a736b9773c74f9557683ffacbd22d5a88383600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b60096020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806136c857506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b15156136d357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561374a57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60088181548110151561375c57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156138355750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b1561383f57600080fd5b806040518082805190602001908083835b6020831015156138755780518252602082019150602081019050602083039250613850565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160405180828054600181600116156101000203166002900480156139435780601f10613921576101008083540402835291820191613943565b820191906000526020600020905b81548152906001019060200180831161392f575b505091505060405180910390206000191614151561396657613965848261115b565b5b811515600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff1615151415156139cd576139cc8483612630565b5b82600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141515613a2357613a2284846129fc565b5b50505050565b6000828211151515613a3757fe5b818303905092915050565b6000808284019050838110151515613a5657fe5b8091505092915050565b6000806000613a758660018601600a0a613a9e565b9150600a6005613a858488613ad1565b01811515613a8f57fe5b04905080925050509392505050565b60008082840290506000841480613abf5750828482811515613abc57fe5b04145b1515613ac757fe5b8091505092915050565b6000808284811515613adf57fe5b0490508091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b2d57805160ff1916838001178555613b5b565b82800160010185558215613b5b579182015b82811115613b5a578251825591602001919060010190613b3f565b5b509050613b689190613c20565b5090565b60a0604051908101604052806000151581526020016000151581526020016000815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613be157805160ff1916838001178555613c0f565b82800160010185558215613c0f579182015b82811115613c0e578251825591602001919060010190613bf3565b5b509050613c1c9190613c20565b5090565b613c4291905b80821115613c3e576000816000905550600101613c26565b5090565b905600a165627a7a72305820a25a598a3c4867db366b2ec9ce950b735376cfa296d435919bc498b3fd1e2acb0029", + "deployedBytecode": "0x6080604052600436106101cd576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630356fe3a1461023a57806306fdde031461026557806308ae4b0c146102f55780630d6d1437146103d557806312065fe01461045e5780631468fc2614610489578063158ef93e146104b657806324e2ca92146104e55780632e1a7d4d146105325780632f0ae5131461055f578063346692b7146105d6578063389435e8146106435780633a98ef391461069a5780634a914e8c146106c55780634b319713146106f057806350f4f9f81461071b5780635ea40983146107685780636e2fd470146108075780637029144c146108325780637cc1f867146108e15780637d22f431146109b957806380056b5b14610a0e57806385dcbb5a14610a5d5780638da5cb5b14610b325780638e2a647014610b89578063997072f714610bd65780639b3bc6fb14610c015780639d21328f14610c58578063aaf5eb6814610c83578063ad3cd88314610cae578063aec8fae814610d17578063be4b177214610d84578063c06474e014610dd1578063e486033914610e1e578063f2fde38b14610e80578063f504b08914610ec3578063fac2548b14610f30575b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1005b34801561024657600080fd5b5061024f610fcf565b6040518082815260200191505060405180910390f35b34801561027157600080fd5b5061027a610fd5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102ba57808201518184015260208101905061029f565b50505050905090810190601f1680156102e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561030157600080fd5b50610336600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611073565b60405180861515151581526020018515151515815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561039657808201518184015260208101905061037b565b50505050905090810190601f1680156103c35780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b3480156103e157600080fd5b5061045c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061115b565b005b34801561046a57600080fd5b506104736114a9565b6040518082815260200191505060405180910390f35b34801561049557600080fd5b506104b4600480360381019080803590602001909291905050506114c8565b005b3480156104c257600080fd5b506104cb61162b565b604051808215151515815260200191505060405180910390f35b3480156104f157600080fd5b5061053060048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061163e565b005b34801561053e57600080fd5b5061055d60048036038101908080359060200190929190505050611815565b005b34801561056b57600080fd5b506105c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a56565b6040518082815260200191505060405180910390f35b3480156105e257600080fd5b5061060160048036038101908080359060200190929190505050611b54565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561064f57600080fd5b50610684600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b92565b6040518082815260200191505060405180910390f35b3480156106a657600080fd5b506106af611ce9565b6040518082815260200191505060405180910390f35b3480156106d157600080fd5b506106da611cef565b6040518082815260200191505060405180910390f35b3480156106fc57600080fd5b50610705611d0d565b6040518082815260200191505060405180910390f35b34801561072757600080fd5b50610766600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d13565b005b34801561077457600080fd5b50610805600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050611f93565b005b34801561081357600080fd5b5061081c61220d565b6040518082815260200191505060405180910390f35b34801561083e57600080fd5b506108df600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050612213565b005b3480156108ed57600080fd5b506108f66125ef565b60405180806020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001858152602001848152602001838152602001828103825287818151815260200191508051906020019080838360005b8381101561097a57808201518184015260208101905061095f565b50505050905090810190601f1680156109a75780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390f35b3480156109c557600080fd5b506109f8600480360381019080803590602001909291908035906020019092919080359060200190929190505050612610565b6040518082815260200191505060405180910390f35b348015610a1a57600080fd5b50610a5b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050612630565b005b348015610a6957600080fd5b50610a9e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061280b565b604051808515151515815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610af4578082015181840152602081019050610ad9565b50505050905090810190601f168015610b215780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b348015610b3e57600080fd5b50610b476129d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610b9557600080fd5b50610bd4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506129fc565b005b348015610be257600080fd5b50610beb612bac565b6040518082815260200191505060405180910390f35b348015610c0d57600080fd5b50610c42600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612bb9565b6040518082815260200191505060405180910390f35b348015610c6457600080fd5b50610c6d612c98565b6040518082815260200191505060405180910390f35b348015610c8f57600080fd5b50610c98612c9e565b6040518082815260200191505060405180910390f35b348015610cba57600080fd5b50610d15600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050612ca3565b005b348015610d2357600080fd5b50610d4260048036038101908080359060200190929190505050612ea7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610d9057600080fd5b50610dcf60048036038101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612eea565b005b348015610ddd57600080fd5b50610e1c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613370565b005b348015610e2a57600080fd5b50610e5f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135f0565b60405180831515151581526020018281526020019250505060405180910390f35b348015610e8c57600080fd5b50610ec1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613621565b005b348015610ecf57600080fd5b50610eee6004803603810190808035906020019092919050505061374d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610f3c57600080fd5b50610fcd600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803515159060200190929190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061378b565b005b60045481565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561106b5780601f106110405761010080835404028352916020019161106b565b820191906000526020600020905b81548152906001019060200180831161104e57829003601f168201915b505050505081565b60076020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900460ff1690806001015490806002015490806003018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111515780601f1061112657610100808354040283529160200191611151565b820191906000526020600020905b81548152906001019060200180831161113457829003601f168201915b5050505050905085565b81600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff1615156111b757600080fd5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561124057506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b80156112995750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b156112a357600080fd5b6015825111156112b257600080fd5b7f154ad3f744d3641de12f5e012773b0126c47d1ffda727e5a61a2e6db8bb2cb5583600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030184604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001806020018381038352858181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156113d65780601f106113ab576101008083540402835291602001916113d6565b820191906000526020600020905b8154815290600101906020018083116113b957829003601f168201915b5050838103825284818151815260200191508051906020019080838360005b838110156114105780820151818401526020810190506113f5565b50505050905090810190601f16801561143d5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a181600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030190805190602001906114a3929190613aec565b50505050565b60003073ffffffffffffffffffffffffffffffffffffffff1631905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061156f57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b151561157a57600080fd5b60065481101561158957600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16316115b660065483613a2990919063ffffffff16565b11156115c157600080fd5b7f5b3ea9617f529540e1c3e0beb0e01c060418c2d1fe48d369afe3d47beaa037cf3073ffffffffffffffffffffffffffffffffffffffff16316005548360405180848152602001838152602001828152602001935050505060405180910390a18060058190555050565b600060149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156116e85750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b156116f257600080fd5b6116fa611cef565b82111561170657600080fd5b61171b82600654613a4290919063ffffffff16565b6006819055508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015611767573d6000803e3d6000fd5b507f223162e752821eb7bd44782f73723defb6e3a087a9afc4d3d4af13783f7b6aca338284600654604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390a15050565b600033600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561187357600080fd5b61187c33611b92565b91506118d3600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015483613a2990919063ffffffff16565b8311156118df57600080fd5b61193483600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154613a4290919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555061198f83600354613a4290919063ffffffff16565b6003819055503373ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156119db573d6000803e3d6000fd5b507ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5683384600354604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b6000806000806000611abb600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154611aad88612bb9565b613a4290919063ffffffff16565b9350611ad5600254601286613a609092919063ffffffff16565b9250611b2c600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015484613a9e90919063ffffffff16565b9150611b456012600a0a83613ad190919063ffffffff16565b90508094505050505092915050565b600a81815481101515611b6357fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600085600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515611bf657600080fd5b611c226003543073ffffffffffffffffffffffffffffffffffffffff1631613a4290919063ffffffff16565b9450611c3960055486613a2990919063ffffffff16565b9450611c5060065486613a4290919063ffffffff16565b9450611c6a600254601287613a609092919063ffffffff16565b9350611cc1600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015485613a9e90919063ffffffff16565b9250611cda6012600a0a84613ad190919063ffffffff16565b91508195505050505050919050565b60025481565b6000611d08600654600554613a2990919063ffffffff16565b905090565b60035481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611dbd5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b15611dc757600080fd5b81600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515611e2357600080fd5b611e3882600254613a4290919063ffffffff16565b600281905550611e9382600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a4290919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f0d0d4d1bc5a254e66ec692f9d1a4452fed4b59a3a1ba48b1a991838e5c7c4b8a8383600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b611f9b613b6c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156120455750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b1561204f57600080fd5b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156120a957600080fd5b6015825111156120b857600080fd5b60018160000190151590811515815250508281602001901515908115158152505081816080018190525080600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160010155606082015181600201556080820151816003019080519060200190612192929190613ba0565b5090505060088590806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506122068585611d13565b5050505050565b60065481565b61221b613b6c565b600060149054906101000a900460ff161515156122a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f414c524541445920494e495449414c495a45440000000000000000000000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055504360048190555060158351111561231157600080fd5b60158251111561232057600080fd5b8260019080519060200190612336929190613aec565b506001816000019015159081151581525050600181602001901515908115158152505081816080018190525080600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548160ff02191690831515021790555060208201518160000160016101000a81548160ff02191690831515021790555060408201518160010155606082015181600201556080820151816003019080519060200190612412929190613ba0565b5090505060083290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506124926001600254613a4290919063ffffffff16565b6002819055506124ee6001600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a4290919063ffffffff16565b600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f0d0d4d1bc5a254e66ec692f9d1a4452fed4b59a3a1ba48b1a991838e5c7c4b8a326001600760003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b60606000806000808484848484849450945094509450945094509091929394565b6000612627838386613a609092919063ffffffff16565b90509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156126da5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b156126e457600080fd5b7eb763075216b1778fecb2719c6d2040ed88fdbe6092a9597de5df9d175c968a82600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff1683604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018315151515815260200182151515158152602001935050505060405180910390a180600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160016101000a81548160ff0219169083151502179055505050565b6000806000606061281a613b6c565b85600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561287657600080fd5b600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060a060405190810160405290816000820160009054906101000a900460ff161515151581526020016000820160019054906101000a900460ff161515151581526020016001820154815260200160028201548152602001600382018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129a45780601f10612979576101008083540402835291602001916129a4565b820191906000526020600020905b81548152906001019060200180831161298757829003601f168201915b50505050508152505091508160200151826040015183606001518460800151809050955095509550955050509193509193565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015612aa85750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b15612ab257600080fd5b82600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515612b0e57600080fd5b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154915081831415612b6057600080fd5b81831115612b8957612b8484612b7f8486613a2990919063ffffffff16565b611d13565b612ba6565b612ba584612ba08585613a2990919063ffffffff16565b613370565b5b50505050565b6000600880549050905090565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015612c5657600080fd5b505af1158015612c6a573d6000803e3d6000fd5b505050506040513d6020811015612c8057600080fd5b81019080805190602001909291905050509050919050565b60055481565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015612d4d5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b15612d5757600080fd5b601581511115612d6657600080fd5b7f7244709f741ec5f1d637fd5a891de308c779d1023c0f3128595bb88bf571ef88600182604051808060200180602001838103835285818154600181600116156101000203166002900481526020019150805460018160011615610100020316600290048015612e175780601f10612dec57610100808354040283529160200191612e17565b820191906000526020600020905b815481529060010190602001808311612dfa57829003601f168201915b5050838103825284818151815260200191508051906020019080838360005b83811015612e51578082015181840152602081019050612e36565b50505050905090810190601f168015612e7e5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a18060019080519060200190612ea3929190613aec565b5050565b6000600882815481101515612eb857fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600033600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515612f4857600080fd5b612f523384611a56565b9150612fe6600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483613a2990919063ffffffff16565b841115612ff257600080fd5b61308484600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a4290919063ffffffff16565b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061315c84600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a4290919063ffffffff16565b600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055508273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561324557600080fd5b505af1158015613259573d6000803e3d6000fd5b505050506040513d602081101561326f57600080fd5b8101908080519060200190929190505050507fffdaa1b8f229c4f9a0c79b712224a2ad8d3aa3c483c23a125f4b9c179870938d338585600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200194505050505060405180910390a150505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415801561341a5750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b1561342457600080fd5b81600760008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561348057600080fd5b61349582600254613a2990919063ffffffff16565b6002819055506134f082600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154613a2990919063ffffffff16565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055507f67d4e98c6b70fdfbb7305797bbb30889a736b9773c74f9557683ffacbd22d5a88383600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1505050565b60096020528060005260406000206000915090508060000160009054906101000a900460ff16908060010154905082565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806136c857506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b15156136d357600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561374a57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60088181548110151561375c57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580156138355750600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff16155b1561383f57600080fd5b806040518082805190602001908083835b6020831015156138755780518252602082019150602081019050602083039250613850565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902060001916600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160405180828054600181600116156101000203166002900480156139435780601f10613921576101008083540402835291820191613943565b820191906000526020600020905b81548152906001019060200180831161392f575b505091505060405180910390206000191614151561396657613965848261115b565b5b811515600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160019054906101000a900460ff1615151415156139cd576139cc8483612630565b5b82600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154141515613a2357613a2284846129fc565b5b50505050565b6000828211151515613a3757fe5b818303905092915050565b6000808284019050838110151515613a5657fe5b8091505092915050565b6000806000613a758660018601600a0a613a9e565b9150600a6005613a858488613ad1565b01811515613a8f57fe5b04905080925050509392505050565b60008082840290506000841480613abf5750828482811515613abc57fe5b04145b1515613ac757fe5b8091505092915050565b6000808284811515613adf57fe5b0490508091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613b2d57805160ff1916838001178555613b5b565b82800160010185558215613b5b579182015b82811115613b5a578251825591602001919060010190613b3f565b5b509050613b689190613c20565b5090565b60a0604051908101604052806000151581526020016000151581526020016000815260200160008152602001606081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10613be157805160ff1916838001178555613c0f565b82800160010185558215613c0f579182015b82811115613c0e578251825591602001919060010190613bf3565b5b509050613c1c9190613c20565b5090565b613c4291905b80821115613c3e576000816000905550600101613c26565b5090565b905600a165627a7a72305820a25a598a3c4867db366b2ec9ce950b735376cfa296d435919bc498b3fd1e2acb0029", + "sourceMap": "989:11789:0:-;;;711:9;703:5;;:17;;;;;;;;;;;;;;;;;;989:11789;;;;;;", + "deployedSourceMap": "989:11789:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4136:30;4144:10;4156:9;4136:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;989:11789;1354:33;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1354:33:0;;;;;;;;;;;;;;;;;;;;;;;1115:18;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1115:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1115:18:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1661:41;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1661:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;1661:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6558:339;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6558:339:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4681:99;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4681:99:0;;;;;;;;;;;;;;;;;;;;;;;7572:343;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7572:343:0;;;;;;;;;;;;;;;;;;;;;;;;;;1057:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1057:23:0;;;;;;;;;;;;;;;;;;;;;;;;;;;10648:345;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10648:345:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9364:458;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9364:458:0;;;;;;;;;;;;;;;;;;;;;;;;;;11934:526;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11934:526:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2055:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2055:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11169:758;;8:9:-1;5:2;;;30:1;27;20:12;5:2;11169:758:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1186:26;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1186:26:0;;;;;;;;;;;;;;;;;;;;;;;12466:149;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12466:149:0;;;;;;;;;;;;;;;;;;;;;;;1265:29;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1265:29:0;;;;;;;;;;;;;;;;;;;;;;;8448:253;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8448:253:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5648:497;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5648:497:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1580:37;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1580:37:0;;;;;;;;;;;;;;;;;;;;;;;2299:975;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2299:975:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4790:249;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4790:249:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;4790:249:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12645:131;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12645:131:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6903:184;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6903:184:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5049:264;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5049:264:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;5049:264:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;640:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;640:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;8018:373;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8018:373:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4458:97;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4458:97:0;;;;;;;;;;;;;;;;;;;;;;;5319:275;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5319:275:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1546:28;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1546:28:0;;;;;;;;;;;;;;;;;;;;;;;1454:38;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1454:38:0;;;;;;;;;;;;;;;;;;;;;;;7152:187;;8:9:-1;5:2;;;30:1;27;20:12;5:2;7152:187:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4565:106;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4565:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9872:589;;8:9:-1;5:2;;;30:1;27;20:12;5:2;9872:589:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8758:259;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8758:259:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2010:39;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2010:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;838:147;;8:9:-1;5:2;;;30:1;27;20:12;5:2;838:147:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;1708:27;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1708:27:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6151:341;;8:9:-1;5:2;;;30:1;27;20:12;5:2;6151:341:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1354:33;;;;:::o;1115:18::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1661:41::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6558:339::-;6633:3;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;6666:3;6652:17;;:10;:17;;;;:40;;;;;6687:5;;;;;;;;;;;6673:19;;:10;:19;;;;6652:40;:70;;;;;6697:7;:19;6705:10;6697:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;6696:26;6652:70;6648:84;;;6724:8;;;6648:84;6770:2;6752:7;6746:21;:26;6742:40;;;6774:8;;;6742:40;6792:55;6809:3;6814:7;:12;6822:3;6814:12;;;;;;;;;;;;;;;:23;;6839:7;6792:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;6792:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6883:7;6857;:12;6865:3;6857:12;;;;;;;;;;;;;;;:23;;:33;;;;;;;;;;;;:::i;:::-;;6558:339;;;:::o;4681:99::-;4727:15;4761:4;:12;;;4754:19;;4681:99;:::o;7572:343::-;786:5;;;;;;;;;;;772:19;;:10;:19;;;:41;;;;808:5;;;;;;;;;;;795:18;;:9;:18;;;772:41;764:50;;;;;;;;7683:22;;7667:13;:38;7663:52;;;7707:8;;;7663:52;7773:4;:12;;;7729:41;7747:22;;7729:13;:17;;:41;;;;:::i;:::-;:56;7725:70;;;7787:8;;;7725:70;7806:63;7826:4;:12;;;7840:13;;7855;7806:63;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7895:13;7879;:29;;;;7572:343;:::o;1057:23::-;;;;;;;;;;;;;:::o;10648:345::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;10749:41;:39;:41::i;:::-;10740:6;:50;10736:64;;;10792:8;;;10736:64;10844:34;10871:6;10844:22;;:26;;:34;;;;:::i;:::-;10819:22;:59;;;;10888:2;:11;;:19;10900:6;10888:19;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10888:19:0;10917:69;10939:10;10951:2;10955:6;10963:22;;10917:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10648:345;;:::o;9364:458::-;9440:16;9418:10;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;9459:44;9492:10;9459:32;:44::i;:::-;9440:63;;9526:43;9539:7;:19;9547:10;9539:19;;;;;;;;;;;;;;;:29;;;9526:8;:12;;:43;;;;:::i;:::-;9517:6;:52;9513:66;;;9571:8;;;9513:66;9630:41;9664:6;9630:7;:19;9638:10;9630:19;;;;;;;;;;;;;;;:29;;;:33;;:41;;;;:::i;:::-;9598:7;:19;9606:10;9598:19;;;;;;;;;;;;;;;:29;;:73;;;;9698:26;9717:6;9698:14;;:18;;:26;;;;:::i;:::-;9681:14;:43;;;;9734:10;:19;;:27;9754:6;9734:27;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9734:27:0;9771:44;9780:10;9792:6;9800:14;;9771:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9364:458;;;:::o;11934:526::-;12033:7;12052:18;12243:22;12321:14;12387;12073:58;12102:6;:13;12109:5;12102:13;;;;;;;;;;;;;;;:28;;;12073:24;12091:5;12073:17;:24::i;:::-;:28;;:58;;;;:::i;:::-;12052:79;;12268:42;12287:11;;1490:2;12268:10;:18;;:42;;;;;:::i;:::-;12243:67;;12338:39;12357:7;:12;12365:3;12357:12;;;;;;;;;;;;;;;:19;;;12338:14;:18;;:39;;;;:::i;:::-;12321:56;;12404:25;1490:2;12415;:13;12404:6;:10;;:25;;;;:::i;:::-;12387:42;;12447:6;12440:13;;11934:526;;;;;;;;:::o;2055:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;11169:758::-;11267:7;11424:18;11710:22;11788:14;11854;11253:3;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;11445:32;11462:14;;11445:4;:12;;;:16;;:32;;;;:::i;:::-;11424:53;;11500:29;11515:13;;11500:10;:14;;:29;;;;:::i;:::-;11487:42;;11552:38;11567:22;;11552:10;:14;;:38;;;;:::i;:::-;11539:51;;11735:42;11754:11;;1490:2;11735:10;:18;;:42;;;;;:::i;:::-;11710:67;;11805:39;11824:7;:12;11832:3;11824:12;;;;;;;;;;;;;;;:19;;;11805:14;:18;;:39;;;;:::i;:::-;11788:56;;11871:25;1490:2;11882;:13;11871:6;:10;;:25;;;;:::i;:::-;11854:42;;11914:6;11907:13;;11169:758;;;;;;;;:::o;1186:26::-;;;;:::o;12466:149::-;12541:7;12567:41;12585:22;;12567:13;;:17;;:41;;;;:::i;:::-;12560:48;;12466:149;:::o;1265:29::-;;;;:::o;8448:253::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;8527:3;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;8556:23;8572:6;8556:11;;:15;;:23;;;;:::i;:::-;8542:11;:37;;;;8611:31;8635:6;8611:7;:12;8619:3;8611:12;;;;;;;;;;;;;;;:19;;;:23;;:31;;;;:::i;:::-;8589:7;:12;8597:3;8589:12;;;;;;;;;;;;;;;:19;;:53;;;;8652:42;8661:3;8666:6;8674:7;:12;8682:3;8674:12;;;;;;;;;;;;;;;:19;;;8652:42;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4287:1;8448:253;;:::o;5648:497::-;5910:23;;:::i;:::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;5817:7;:12;5825:3;5817:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;5813:33;;;5838:8;;;5813:33;5887:2;5866:10;5860:24;:29;5856:43;;;5891:8;;;5856:43;5962:4;5943:9;:16;;:23;;;;;;;;;;;5994:5;5976:9;:15;;:23;;;;;;;;;;;6032:10;6009:9;:20;;:33;;;;6068:9;6053:7;:12;6061:3;6053:12;;;;;;;;;;;;;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;6087:10;6103:3;6087:20;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;6087:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6117:21;6126:3;6131:6;6117:8;:21::i;:::-;5648:497;;;;;:::o;1580:37::-;;;;:::o;2299:975::-;2721:23;;:::i;:::-;2382:11;;;;;;;;;;;2381:12;2373:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2441:4;2427:11;;:18;;;;;;;;;;;;;;;;;;2463:9;2455:5;;:17;;;;;;;;;;;;;;;;;;2503:12;2482:18;:33;;;;2559:2;2535:13;2529:27;:32;2525:46;;;2563:8;;;2525:46;2614:2;2591:12;2585:26;:31;2581:45;;;2618:8;;;2581:45;2643:13;2636:4;:20;;;;;;;;;;;;:::i;:::-;;2773:4;2754:9;:16;;:23;;;;;;;;;;;2805:4;2787:9;:15;;:22;;;;;;;;;;;2842:12;2819:9;:20;;:35;;;;2886:9;2865:7;:18;2873:9;2865:18;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;2905:10;2921:9;2905:26;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;2905:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2995:18;3011:1;2995:11;;:15;;:18;;;;:::i;:::-;2981:11;:32;;;;3051;3081:1;3051:7;:18;3059:9;3051:18;;;;;;;;;;;;;;;:25;;;:29;;:32;;;;:::i;:::-;3023:7;:18;3031:9;3023:18;;;;;;;;;;;;;;;:25;;:60;;;;3093:49;3102:9;3113:1;3116:7;:18;3124:9;3116:18;;;;;;;;;;;;;;;:25;;;3093:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2299:975;;;:::o;4790:249::-;4841:11;4854:13;4870:26;4899:19;4921:22;4970:4;4977:5;4984:18;5004:11;5017:14;4955:77;;;;;;;;;;;;;4790:249;;;;;:::o;12645:131::-;12728:7;12754:15;12764:1;12767;12754;:9;;:15;;;;;:::i;:::-;12747:22;;12645:131;;;;;:::o;6903:184::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;6990:50;7006:3;7011:7;:12;7019:3;7011:12;;;;;;;;;;;;;;;:18;;;;;;;;;;;;7031:8;6990:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7071:8;7050:7;:12;7058:3;7050:12;;;;;;;;;;;;;;;:18;;;:29;;;;;;;;;;;;;;;;;;6903:184;;:::o;5049:264::-;5136:10;5148:14;5164:17;5183;5210:15;;:::i;:::-;5118:8;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;5228:7;:17;5236:8;5228:17;;;;;;;;;;;;;;;5210:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5261:1;:7;;;5270:1;:8;;;5280:1;:11;;;5293:1;:12;;;5253:53;;;;;;;;;;;5049:264;;;;;;;:::o;640:20::-;;;;;;;;;;;;;:::o;8018:373::-;8118:21;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;8103:3;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;8142:7;:12;8150:3;8142:12;;;;;;;;;;;;;;;:19;;;8118:43;;8185:13;8175:6;:23;8171:37;;;8200:8;;;8171:37;8231:13;8222:6;:22;8218:167;;;8260:40;8269:3;8274:25;8285:13;8274:6;:10;;:25;;;;:::i;:::-;8260:8;:40::i;:::-;8218:167;;;8331:43;8343:3;8348:25;8366:6;8348:13;:17;;:25;;;;:::i;:::-;8331:11;:43::i;:::-;8218:167;4287:1;8018:373;;;:::o;4458:97::-;4508:4;4531:10;:17;;;;4524:24;;4458:97;:::o;5319:275::-;5385:7;5417:5;5411:22;;;5442:4;5411:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5411:37:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;5411:37:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;5411:37:0;;;;;;;;;;;;;;;;5404:44;;5319:275;;;:::o;1546:28::-;;;;:::o;1454:38::-;1490:2;1454:38;:::o;7152:187::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;7253:2;7235:7;7229:21;:26;7225:40;;;7257:8;;;7225:40;7275:33;7294:4;7300:7;7275:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;99:1;94:3;90:11;84:18;80:1;75:3;71:11;64:39;52:2;49:1;45:10;40:15;;8:100;;;12:14;7275:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7325:7;7318:4;:14;;;;;;;;;;;;:::i;:::-;;7152:187;:::o;4565:106::-;4623:7;4649:10;4660:3;4649:15;;;;;;;;;;;;;;;;;;;;;;;;;;;4642:22;;4565:106;;;:::o;9872:589::-;9968:16;9946:10;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;9987:56;10025:10;10037:5;9987:37;:56::i;:::-;9968:75;;10066:56;10079:7;:19;10087:10;10079:19;;;;;;;;;;;;;;;:35;;:42;10115:5;10079:42;;;;;;;;;;;;;;;;10066:8;:12;;:56;;;;:::i;:::-;10057:6;:65;10053:79;;;10124:8;;;10053:79;10188:54;10235:6;10188:7;:19;10196:10;10188:19;;;;;;;;;;;;;;;:35;;:42;10224:5;10188:42;;;;;;;;;;;;;;;;:46;;:54;;;;:::i;:::-;10143:7;:19;10151:10;10143:19;;;;;;;;;;;;;;;:35;;:42;10179:5;10143:42;;;;;;;;;;;;;;;:99;;;;10283:40;10316:6;10283;:13;10290:5;10283:13;;;;;;;;;;;;;;;:28;;;:32;;:40;;;;:::i;:::-;10252:6;:13;10259:5;10252:13;;;;;;;;;;;;;;;:28;;:71;;;;10339:5;10333:21;;;10355:10;10367:6;10333:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10333:41:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10333:41:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;10333:41:0;;;;;;;;;;;;;;;;;10384:70;10398:10;10410:6;10418:5;10425:6;:13;10432:5;10425:13;;;;;;;;;;;;;;;:28;;;10384:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9872:589;;;;:::o;8758:259::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;8840:3;4352:7;:12;4360:3;4352:12;;;;;;;;;;;;;;;:19;;;;;;;;;;;;4351:20;4347:34;;;4373:8;;;4347:34;8869:23;8885:6;8869:11;;:15;;:23;;;;:::i;:::-;8855:11;:37;;;;8924:31;8948:6;8924:7;:12;8932:3;8924:12;;;;;;;;;;;;;;;:19;;;:23;;:31;;;;:::i;:::-;8902:7;:12;8910:3;8902:12;;;;;;;;;;;;;;;:19;;:53;;;;8965:45;8977:3;8982:6;8990:7;:12;8998:3;8990:12;;;;;;;;;;;;;;;:19;;;8965:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4287:1;8758:259;;:::o;2010:39::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;838:147::-;786:5;;;;;;;;;;;772:19;;:10;:19;;;:41;;;;808:5;;;;;;;;;;;795:18;;:9;:18;;;772:41;764:50;;;;;;;;934:1;914:22;;:8;:22;;;;910:69;;;960:8;952:5;;:16;;;;;;;;;;;;;;;;;;910:69;838:147;:::o;1708:27::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;6151:341::-;4229:5;;;;;;;;;;;4215:19;;:10;:19;;;;:49;;;;;4239:7;:19;4247:10;4239:19;;;;;;;;;;;;;;;:25;;;;;;;;;;;;4238:26;4215:49;4211:63;;;4266:8;;;4211:63;6300:4;6295:10;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;98:2;93:3;89:12;82:19;;123:2;118:3;114:12;107:19;;148:2;143:3;139:12;132:19;;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;6295:10:0;;;;;;;;;;;;;;;;6262:43;;;6267:7;:12;6275:3;6267:12;;;;;;;;;;;;;;;:23;;6262:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:43;;;;;6258:76;;;6307:27;6324:3;6329:4;6307:16;:27::i;:::-;6258:76;6370:7;6348:29;;:7;:12;6356:3;6348:12;;;;;;;;;;;;;;;:18;;;;;;;;;;;;:29;;;;6344:69;;;6379:34;6400:3;6405:7;6379:20;:34::i;:::-;6344:69;6450:6;6427:7;:12;6435:3;6427:12;;;;;;;;;;;;;;;:19;;;:29;;6423:62;;;6458:27;6473:3;6478:6;6458:14;:27::i;:::-;6423:62;6151:341;;;;:::o;14206:124::-;14268:7;14299:1;14294;:6;;14287:14;;;;;;14322:1;14318;:5;14311:12;;14206:124;;;;:::o;14336:147::-;14398:7;14417:9;14433:1;14429;:5;14417:17;;14456:1;14451;:6;;14444:14;;;;;;14475:1;14468:8;;14336:147;;;;;:::o;14648:377::-;14750:16;14826:18;14931:17;14847:35;14851:9;14879:1;14869:9;:11;14862:2;:19;14847:3;:35::i;:::-;14826:56;;14988:2;14983:1;14952:28;14956:10;14968:11;14952:3;:28::i;:::-;:32;14951:39;;;;;;;;14931:59;;15008:9;15000:18;;14648:377;;;;;;;:::o;13746:161::-;13808:7;13827:9;13843:1;13839;:5;13827:17;;13866:1;13861;:6;:20;;;;13880:1;13875;13871;:5;;;;;;;;:10;13861:20;13854:28;;;;;;13899:1;13892:8;;13746:161;;;;;:::o;13913:287::-;13975:7;14072:9;14088:1;14084;:5;;;;;;;;14072:17;;14192:1;14185:8;;13913:287;;;;;:::o;989:11789::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o", + "source": "pragma solidity ^0.4.15;\n\n/**\n * @title Doneth (Doneth)\n * @dev Doneth is a contract that allows shared access to funds\n * in the form of Ether and ERC20 tokens. It is especially relevant\n * to donation based projects. The admins of the contract determine \n * who is a member, and each member gets a number of shares. The \n * number of shares each member has determines how much Ether/ERC20 \n * the member can withdraw from the contract.\n */\n\n/*\n * Ownable\n *\n * Base contract with an owner.\n * Provides onlyOwner modifier, which prevents function from running\n * if it is called by anyone other than the owner.\n */\n\ncontract Ownable {\n address public owner;\n\n function Ownable() public {\n owner = tx.origin;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner || tx.origin == owner);\n _;\n }\n\n function transferOwnership(address newOwner) onlyOwner public {\n if (newOwner != address(0)) {\n owner = newOwner;\n }\n }\n}\n\ncontract Doneth is Ownable {\n using SafeMath for uint256; \n\n bool public initialized;\n\n // Name of the contract\n string public name;\n\n // Sum of all shares allocated to members\n uint256 public totalShares;\n\n // Sum of all withdrawals done by members\n uint256 public totalWithdrawn;\n\n // Block number of when the contract was created\n uint256 public genesisBlockNumber;\n\n // Number of decimal places for floating point division\n uint256 constant public PRECISION = 18;\n\n // Variables for shared expense allocation\n uint256 public sharedExpense;\n uint256 public sharedExpenseWithdrawn;\n\n // Used to keep track of members\n mapping(address => Member) public members;\n address[] public memberKeys;\n struct Member {\n bool exists;\n bool admin;\n uint256 shares;\n uint256 withdrawn;\n string memberName;\n mapping(address => uint256) tokensWithdrawn;\n }\n\n // Used to keep track of ERC20 tokens used and how much withdrawn\n mapping(address => Token) public tokens;\n address[] public tokenKeys;\n struct Token {\n bool exists;\n uint256 totalWithdrawn;\n }\n\n // constructor() public {\n // genesisBlockNumber = block.number;\n // addMember(tx.origin, 1, true, \"\");\n // }\n\n\n function init(string _contractName, string _founderName) public {\n require(!initialized, \"ALREADY INITIALIZED\");\n initialized = true;\n owner = tx.origin;\n genesisBlockNumber = block.number;\n if (bytes(_contractName).length > 21) revert();\n if (bytes(_founderName).length > 21) revert();\n name = _contractName;\n // addMember(founder, 1, true, _founderName);\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = true;\n newMember.memberName = _founderName;\n\n members[tx.origin] = newMember;\n memberKeys.push(tx.origin);\n // addShare(tx.origin, shares);\n totalShares = totalShares.add(1);\n members[tx.origin].shares = members[tx.origin].shares.add(1);\n AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(msg.sender, 1, members[tx.origin].shares);\n }\n\n event Deposit(address from, uint value);\n event Withdraw(address from, uint value, uint256 newTotalWithdrawn);\n event TokenWithdraw(address from, uint value, address token, uint amount);\n event AddShare(address who, uint256 addedShares, uint256 newTotalShares);\n event RemoveShare(address who, uint256 removedShares, uint256 newTotalShares);\n event ChangePrivilege(address who, bool oldValue, bool newValue);\n event ChangeContractName(string oldValue, string newValue);\n event ChangeMemberName(address who, string oldValue, string newValue);\n event ChangeSharedExpense(uint256 contractBalance, uint256 oldValue, uint256 newValue);\n event WithdrawSharedExpense(address from, address to, uint value, uint256 newSharedExpenseWithdrawn);\n\n // Fallback function accepts Ether from donators\n function () public payable {\n Deposit(msg.sender, msg.value);\n }\n\n modifier onlyAdmin() { \n if (msg.sender != owner && !members[msg.sender].admin) revert(); \n _;\n }\n\n modifier onlyExisting(address who) { \n if (!members[who].exists) revert(); \n _;\n }\n\n // Series of getter functions for contract data\n function getMemberCount() public constant returns(uint) {\n return memberKeys.length;\n }\n \n function getMemberAtKey(uint key) public constant returns(address) {\n return memberKeys[key];\n }\n \n function getBalance() public constant returns(uint256 balance) {\n return this.balance;\n }\n \n function getContractInfo() public constant returns(string name, address owner, uint256 genesisBlockNumber, uint256 totalShares, uint256 totalWithdrawn) {\n return (string(name), owner, genesisBlockNumber, totalShares, totalWithdrawn);\n }\n \n function returnMember(address _address) public constant onlyExisting(_address) returns(bool admin, uint256 shares, uint256 withdrawn, string memberName) {\n Member memory m = members[_address];\n return (m.admin, m.shares, m.withdrawn, m.memberName);\n }\n\n function checkERC20Balance(address token) public constant returns(uint256) {\n return ERC20(token).balanceOf(address(this));\n // if (!tokens[token].exists && balance > 0) {\n // tokens[token].exists = true;\n // }\n // return balance;\n }\n\n // Function to add members to the contract \n function addMember(address who, uint256 shares, bool admin, string memberName) public onlyAdmin() {\n // Don't allow the same member to be added twice\n if (members[who].exists) revert();\n if (bytes(memberName).length > 21) revert();\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = admin;\n newMember.memberName = memberName;\n\n members[who] = newMember;\n memberKeys.push(who);\n addShare(who, shares);\n }\n\n function updateMember(address who, uint256 shares, bool isAdmin, string name) public onlyAdmin() {\n if (sha3(members[who].memberName) != sha3(name)) changeMemberName(who, name);\n if (members[who].admin != isAdmin) changeAdminPrivilege(who, isAdmin);\n if (members[who].shares != shares) allocateShares(who, shares);\n }\n\n // Only owner, admin or member can change member's name\n function changeMemberName(address who, string newName) public onlyExisting(who) {\n if (msg.sender != who && msg.sender != owner && !members[msg.sender].admin) revert();\n if (bytes(newName).length > 21) revert();\n ChangeMemberName(who, members[who].memberName, newName);\n members[who].memberName = newName;\n }\n\n function changeAdminPrivilege(address who, bool newValue) public onlyAdmin() {\n ChangePrivilege(who, members[who].admin, newValue);\n members[who].admin = newValue; \n }\n\n // Only admins and owners can change the contract name\n function changeContractName(string newName) public onlyAdmin() {\n if (bytes(newName).length > 21) revert();\n ChangeContractName(name, newName);\n name = newName;\n }\n\n // Shared expense allocation allows admins to withdraw an amount to be used for shared\n // expenses. Shared expense allocation subtracts from the total balance of the contract. \n // Only owner can change this amount.\n function changeSharedExpenseAllocation(uint256 newAllocation) public onlyOwner() {\n if (newAllocation < sharedExpenseWithdrawn) revert();\n if (newAllocation.sub(sharedExpenseWithdrawn) > this.balance) revert();\n\n ChangeSharedExpense(this.balance, sharedExpense, newAllocation);\n sharedExpense = newAllocation;\n }\n\n // Set share amount explicitly by calculating difference then adding or removing accordingly\n function allocateShares(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n uint256 currentShares = members[who].shares;\n if (amount == currentShares) revert();\n if (amount > currentShares) {\n addShare(who, amount.sub(currentShares));\n } else {\n removeShare(who, currentShares.sub(amount));\n }\n }\n\n // Increment the number of shares for a member\n function addShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.add(amount);\n members[who].shares = members[who].shares.add(amount);\n AddShare(who, amount, members[who].shares);\n }\n\n // Decrement the number of shares for a member\n function removeShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.sub(amount);\n members[who].shares = members[who].shares.sub(amount);\n RemoveShare(who, amount, members[who].shares);\n }\n\n // Function for a member to withdraw Ether from the contract proportional\n // to the amount of shares they have. Calculates the totalWithdrawableAmount\n // in Ether based on the member's share and the Ether balance of the contract,\n // then subtracts the amount of Ether that the member has already previously\n // withdrawn.\n function withdraw(uint256 amount) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableAmount(msg.sender);\n if (amount > newTotal.sub(members[msg.sender].withdrawn)) revert();\n \n members[msg.sender].withdrawn = members[msg.sender].withdrawn.add(amount);\n totalWithdrawn = totalWithdrawn.add(amount);\n msg.sender.transfer(amount);\n Withdraw(msg.sender, amount, totalWithdrawn);\n }\n\n // Withdrawal function for ERC20 tokens\n function withdrawToken(uint256 amount, address token) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableTokenAmount(msg.sender, token);\n if (amount > newTotal.sub(members[msg.sender].tokensWithdrawn[token])) revert();\n\n members[msg.sender].tokensWithdrawn[token] = members[msg.sender].tokensWithdrawn[token].add(amount);\n tokens[token].totalWithdrawn = tokens[token].totalWithdrawn.add(amount);\n ERC20(token).transfer(msg.sender, amount);\n TokenWithdraw(msg.sender, amount, token, tokens[token].totalWithdrawn);\n }\n\n // Withdraw from shared expense allocation. Total withdrawable is calculated as \n // sharedExpense minus sharedExpenseWithdrawn. Only Admin can withdraw from shared expense.\n function withdrawSharedExpense(uint256 amount, address to) public onlyAdmin() {\n if (amount > calculateTotalExpenseWithdrawableAmount()) revert();\n \n sharedExpenseWithdrawn = sharedExpenseWithdrawn.add(amount);\n to.transfer(amount);\n WithdrawSharedExpense(msg.sender, to, amount, sharedExpenseWithdrawn);\n }\n\n // Converts from shares to Eth.\n // Ex: 2 shares, 4 total shares, 40 Eth balance\n // 40 Eth / 4 total shares = 10 eth per share * 2 shares = 20 Eth to cash out\n function calculateTotalWithdrawableAmount(address who) public constant onlyExisting(who) returns (uint256) {\n // Total balance to calculate share from = \n // contract balance + totalWithdrawn - sharedExpense + sharedExpenseWithdrawn\n uint256 balanceSum = this.balance.add(totalWithdrawn);\n balanceSum = balanceSum.sub(sharedExpense);\n balanceSum = balanceSum.add(sharedExpenseWithdrawn);\n \n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 ethPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 ethPPN = ethPerSharePPN.mul(members[who].shares);\n uint256 ethVal = ethPPN.div(10**PRECISION); \n return ethVal;\n }\n\n\n function calculateTotalWithdrawableTokenAmount(address who, address token) public constant returns(uint256) {\n uint256 balanceSum = checkERC20Balance(token).add(tokens[token].totalWithdrawn);\n\n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 tokPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 tokPPN = tokPerSharePPN.mul(members[who].shares);\n uint256 tokVal = tokPPN.div(10**PRECISION); \n return tokVal;\n }\n\n function calculateTotalExpenseWithdrawableAmount() public constant returns(uint256) {\n return sharedExpense.sub(sharedExpenseWithdrawn);\n }\n\n // Used for testing\n function delegatePercent(uint256 a, uint256 b, uint256 c) public constant returns (uint256) {\n return a.percent(b, c);\n }\n}\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) public constant returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public constant returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal constant returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal constant returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n\n // Using from SO: https://stackoverflow.com/questions/42738640/division-in-ethereum-solidity/42739843#42739843\n // Adapted to use SafeMath and uint256.\n function percent(uint256 numerator, uint256 denominator, uint256 precision) internal constant returns(uint256 quotient) {\n // caution, check safe-to-multiply here\n uint256 _numerator = mul(numerator, 10 ** (precision+1));\n // with rounding of last digit\n uint256 _quotient = (div(_numerator, denominator) + 5) / 10;\n return (_quotient);\n }\n}\n\n", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + "0xf279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalWithdrawn", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + "0xffdaa1b8f229c4f9a0c79b712224a2ad8d3aa3c483c23a125f4b9c179870938d": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "token", + "type": "address" + }, + { + "indexed": false, + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenWithdraw", + "type": "event" + }, + "0x0d0d4d1bc5a254e66ec692f9d1a4452fed4b59a3a1ba48b1a991838e5c7c4b8a": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "addedShares", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalShares", + "type": "uint256" + } + ], + "name": "AddShare", + "type": "event" + }, + "0x67d4e98c6b70fdfbb7305797bbb30889a736b9773c74f9557683ffacbd22d5a8": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "removedShares", + "type": "uint256" + }, + { + "indexed": false, + "name": "newTotalShares", + "type": "uint256" + } + ], + "name": "RemoveShare", + "type": "event" + }, + "0x00b763075216b1778fecb2719c6d2040ed88fdbe6092a9597de5df9d175c968a": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "oldValue", + "type": "bool" + }, + { + "indexed": false, + "name": "newValue", + "type": "bool" + } + ], + "name": "ChangePrivilege", + "type": "event" + }, + "0x7244709f741ec5f1d637fd5a891de308c779d1023c0f3128595bb88bf571ef88": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "oldValue", + "type": "string" + }, + { + "indexed": false, + "name": "newValue", + "type": "string" + } + ], + "name": "ChangeContractName", + "type": "event" + }, + "0x154ad3f744d3641de12f5e012773b0126c47d1ffda727e5a61a2e6db8bb2cb55": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "who", + "type": "address" + }, + { + "indexed": false, + "name": "oldValue", + "type": "string" + }, + { + "indexed": false, + "name": "newValue", + "type": "string" + } + ], + "name": "ChangeMemberName", + "type": "event" + }, + "0x5b3ea9617f529540e1c3e0beb0e01c060418c2d1fe48d369afe3d47beaa037cf": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "contractBalance", + "type": "uint256" + }, + { + "indexed": false, + "name": "oldValue", + "type": "uint256" + }, + { + "indexed": false, + "name": "newValue", + "type": "uint256" + } + ], + "name": "ChangeSharedExpense", + "type": "event" + }, + "0x223162e752821eb7bd44782f73723defb6e3a087a9afc4d3d4af13783f7b6aca": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "from", + "type": "address" + }, + { + "indexed": false, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + }, + { + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "type": "uint256" + } + ], + "name": "WithdrawSharedExpense", + "type": "event" + } + }, + "links": {}, + "address": "0x62E29f417c19d0ef3F6523e0033Aa147C0cF1297", + "transactionHash": "0x8b320a8cc5b63cad1ba8cde097066fae969ac4dab281941ba762f321d8b125b6" + } + }, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T11:16:10.922Z", + "networkType": "ethereum", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/ERC20.json b/build/contracts/ERC20.json new file mode 100644 index 00000000..a3bc5dd1 --- /dev/null +++ b/build/contracts/ERC20.json @@ -0,0 +1,36423 @@ +{ + "contractName": "ERC20", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "owner", + "type": "address" + }, + { + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "from", + "type": "address" + }, + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "spender", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.15;\n\n/**\n * @title Doneth (Doneth)\n * @dev Doneth is a contract that allows shared access to funds\n * in the form of Ether and ERC20 tokens. It is especially relevant\n * to donation based projects. The admins of the contract determine \n * who is a member, and each member gets a number of shares. The \n * number of shares each member has determines how much Ether/ERC20 \n * the member can withdraw from the contract.\n */\n\n/*\n * Ownable\n *\n * Base contract with an owner.\n * Provides onlyOwner modifier, which prevents function from running\n * if it is called by anyone other than the owner.\n */\n\ncontract Ownable {\n address public owner;\n\n function Ownable() public {\n owner = tx.origin;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner || tx.origin == owner);\n _;\n }\n\n function transferOwnership(address newOwner) onlyOwner public {\n if (newOwner != address(0)) {\n owner = newOwner;\n }\n }\n}\n\ncontract Doneth is Ownable {\n using SafeMath for uint256; \n\n bool public initialized;\n\n // Name of the contract\n string public name;\n\n // Sum of all shares allocated to members\n uint256 public totalShares;\n\n // Sum of all withdrawals done by members\n uint256 public totalWithdrawn;\n\n // Block number of when the contract was created\n uint256 public genesisBlockNumber;\n\n // Number of decimal places for floating point division\n uint256 constant public PRECISION = 18;\n\n // Variables for shared expense allocation\n uint256 public sharedExpense;\n uint256 public sharedExpenseWithdrawn;\n\n // Used to keep track of members\n mapping(address => Member) public members;\n address[] public memberKeys;\n struct Member {\n bool exists;\n bool admin;\n uint256 shares;\n uint256 withdrawn;\n string memberName;\n mapping(address => uint256) tokensWithdrawn;\n }\n\n // Used to keep track of ERC20 tokens used and how much withdrawn\n mapping(address => Token) public tokens;\n address[] public tokenKeys;\n struct Token {\n bool exists;\n uint256 totalWithdrawn;\n }\n\n // constructor() public {\n // genesisBlockNumber = block.number;\n // addMember(tx.origin, 1, true, \"\");\n // }\n\n\n function init(string _contractName, string _founderName) public {\n require(!initialized, \"ALREADY INITIALIZED\");\n initialized = true;\n owner = tx.origin;\n genesisBlockNumber = block.number;\n if (bytes(_contractName).length > 21) revert();\n if (bytes(_founderName).length > 21) revert();\n name = _contractName;\n // addMember(founder, 1, true, _founderName);\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = true;\n newMember.memberName = _founderName;\n\n members[tx.origin] = newMember;\n memberKeys.push(tx.origin);\n // addShare(tx.origin, shares);\n totalShares = totalShares.add(1);\n members[tx.origin].shares = members[tx.origin].shares.add(1);\n AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(msg.sender, 1, members[tx.origin].shares);\n }\n\n event Deposit(address from, uint value);\n event Withdraw(address from, uint value, uint256 newTotalWithdrawn);\n event TokenWithdraw(address from, uint value, address token, uint amount);\n event AddShare(address who, uint256 addedShares, uint256 newTotalShares);\n event RemoveShare(address who, uint256 removedShares, uint256 newTotalShares);\n event ChangePrivilege(address who, bool oldValue, bool newValue);\n event ChangeContractName(string oldValue, string newValue);\n event ChangeMemberName(address who, string oldValue, string newValue);\n event ChangeSharedExpense(uint256 contractBalance, uint256 oldValue, uint256 newValue);\n event WithdrawSharedExpense(address from, address to, uint value, uint256 newSharedExpenseWithdrawn);\n\n // Fallback function accepts Ether from donators\n function () public payable {\n Deposit(msg.sender, msg.value);\n }\n\n modifier onlyAdmin() { \n if (msg.sender != owner && !members[msg.sender].admin) revert(); \n _;\n }\n\n modifier onlyExisting(address who) { \n if (!members[who].exists) revert(); \n _;\n }\n\n // Series of getter functions for contract data\n function getMemberCount() public constant returns(uint) {\n return memberKeys.length;\n }\n \n function getMemberAtKey(uint key) public constant returns(address) {\n return memberKeys[key];\n }\n \n function getBalance() public constant returns(uint256 balance) {\n return this.balance;\n }\n \n function getContractInfo() public constant returns(string name, address owner, uint256 genesisBlockNumber, uint256 totalShares, uint256 totalWithdrawn) {\n return (string(name), owner, genesisBlockNumber, totalShares, totalWithdrawn);\n }\n \n function returnMember(address _address) public constant onlyExisting(_address) returns(bool admin, uint256 shares, uint256 withdrawn, string memberName) {\n Member memory m = members[_address];\n return (m.admin, m.shares, m.withdrawn, m.memberName);\n }\n\n function checkERC20Balance(address token) public constant returns(uint256) {\n return ERC20(token).balanceOf(address(this));\n // if (!tokens[token].exists && balance > 0) {\n // tokens[token].exists = true;\n // }\n // return balance;\n }\n\n // Function to add members to the contract \n function addMember(address who, uint256 shares, bool admin, string memberName) public onlyAdmin() {\n // Don't allow the same member to be added twice\n if (members[who].exists) revert();\n if (bytes(memberName).length > 21) revert();\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = admin;\n newMember.memberName = memberName;\n\n members[who] = newMember;\n memberKeys.push(who);\n addShare(who, shares);\n }\n\n function updateMember(address who, uint256 shares, bool isAdmin, string name) public onlyAdmin() {\n if (sha3(members[who].memberName) != sha3(name)) changeMemberName(who, name);\n if (members[who].admin != isAdmin) changeAdminPrivilege(who, isAdmin);\n if (members[who].shares != shares) allocateShares(who, shares);\n }\n\n // Only owner, admin or member can change member's name\n function changeMemberName(address who, string newName) public onlyExisting(who) {\n if (msg.sender != who && msg.sender != owner && !members[msg.sender].admin) revert();\n if (bytes(newName).length > 21) revert();\n ChangeMemberName(who, members[who].memberName, newName);\n members[who].memberName = newName;\n }\n\n function changeAdminPrivilege(address who, bool newValue) public onlyAdmin() {\n ChangePrivilege(who, members[who].admin, newValue);\n members[who].admin = newValue; \n }\n\n // Only admins and owners can change the contract name\n function changeContractName(string newName) public onlyAdmin() {\n if (bytes(newName).length > 21) revert();\n ChangeContractName(name, newName);\n name = newName;\n }\n\n // Shared expense allocation allows admins to withdraw an amount to be used for shared\n // expenses. Shared expense allocation subtracts from the total balance of the contract. \n // Only owner can change this amount.\n function changeSharedExpenseAllocation(uint256 newAllocation) public onlyOwner() {\n if (newAllocation < sharedExpenseWithdrawn) revert();\n if (newAllocation.sub(sharedExpenseWithdrawn) > this.balance) revert();\n\n ChangeSharedExpense(this.balance, sharedExpense, newAllocation);\n sharedExpense = newAllocation;\n }\n\n // Set share amount explicitly by calculating difference then adding or removing accordingly\n function allocateShares(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n uint256 currentShares = members[who].shares;\n if (amount == currentShares) revert();\n if (amount > currentShares) {\n addShare(who, amount.sub(currentShares));\n } else {\n removeShare(who, currentShares.sub(amount));\n }\n }\n\n // Increment the number of shares for a member\n function addShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.add(amount);\n members[who].shares = members[who].shares.add(amount);\n AddShare(who, amount, members[who].shares);\n }\n\n // Decrement the number of shares for a member\n function removeShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.sub(amount);\n members[who].shares = members[who].shares.sub(amount);\n RemoveShare(who, amount, members[who].shares);\n }\n\n // Function for a member to withdraw Ether from the contract proportional\n // to the amount of shares they have. Calculates the totalWithdrawableAmount\n // in Ether based on the member's share and the Ether balance of the contract,\n // then subtracts the amount of Ether that the member has already previously\n // withdrawn.\n function withdraw(uint256 amount) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableAmount(msg.sender);\n if (amount > newTotal.sub(members[msg.sender].withdrawn)) revert();\n \n members[msg.sender].withdrawn = members[msg.sender].withdrawn.add(amount);\n totalWithdrawn = totalWithdrawn.add(amount);\n msg.sender.transfer(amount);\n Withdraw(msg.sender, amount, totalWithdrawn);\n }\n\n // Withdrawal function for ERC20 tokens\n function withdrawToken(uint256 amount, address token) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableTokenAmount(msg.sender, token);\n if (amount > newTotal.sub(members[msg.sender].tokensWithdrawn[token])) revert();\n\n members[msg.sender].tokensWithdrawn[token] = members[msg.sender].tokensWithdrawn[token].add(amount);\n tokens[token].totalWithdrawn = tokens[token].totalWithdrawn.add(amount);\n ERC20(token).transfer(msg.sender, amount);\n TokenWithdraw(msg.sender, amount, token, tokens[token].totalWithdrawn);\n }\n\n // Withdraw from shared expense allocation. Total withdrawable is calculated as \n // sharedExpense minus sharedExpenseWithdrawn. Only Admin can withdraw from shared expense.\n function withdrawSharedExpense(uint256 amount, address to) public onlyAdmin() {\n if (amount > calculateTotalExpenseWithdrawableAmount()) revert();\n \n sharedExpenseWithdrawn = sharedExpenseWithdrawn.add(amount);\n to.transfer(amount);\n WithdrawSharedExpense(msg.sender, to, amount, sharedExpenseWithdrawn);\n }\n\n // Converts from shares to Eth.\n // Ex: 2 shares, 4 total shares, 40 Eth balance\n // 40 Eth / 4 total shares = 10 eth per share * 2 shares = 20 Eth to cash out\n function calculateTotalWithdrawableAmount(address who) public constant onlyExisting(who) returns (uint256) {\n // Total balance to calculate share from = \n // contract balance + totalWithdrawn - sharedExpense + sharedExpenseWithdrawn\n uint256 balanceSum = this.balance.add(totalWithdrawn);\n balanceSum = balanceSum.sub(sharedExpense);\n balanceSum = balanceSum.add(sharedExpenseWithdrawn);\n \n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 ethPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 ethPPN = ethPerSharePPN.mul(members[who].shares);\n uint256 ethVal = ethPPN.div(10**PRECISION); \n return ethVal;\n }\n\n\n function calculateTotalWithdrawableTokenAmount(address who, address token) public constant returns(uint256) {\n uint256 balanceSum = checkERC20Balance(token).add(tokens[token].totalWithdrawn);\n\n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 tokPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 tokPPN = tokPerSharePPN.mul(members[who].shares);\n uint256 tokVal = tokPPN.div(10**PRECISION); \n return tokVal;\n }\n\n function calculateTotalExpenseWithdrawableAmount() public constant returns(uint256) {\n return sharedExpense.sub(sharedExpenseWithdrawn);\n }\n\n // Used for testing\n function delegatePercent(uint256 a, uint256 b, uint256 c) public constant returns (uint256) {\n return a.percent(b, c);\n }\n}\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) public constant returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public constant returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal constant returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal constant returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n\n // Using from SO: https://stackoverflow.com/questions/42738640/division-in-ethereum-solidity/42739843#42739843\n // Adapted to use SafeMath and uint256.\n function percent(uint256 numerator, uint256 denominator, uint256 precision) internal constant returns(uint256 quotient) {\n // caution, check safe-to-multiply here\n uint256 _numerator = mul(numerator, 10 ** (precision+1));\n // with rounding of last digit\n uint256 _quotient = (div(_numerator, denominator) + 5) / 10;\n return (_quotient);\n }\n}\n\n", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T11:15:37.955Z", + "devdoc": { + "methods": {}, + "title": "ERC20 interface" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/ERC20Basic.json b/build/contracts/ERC20Basic.json new file mode 100644 index 00000000..611ed449 --- /dev/null +++ b/build/contracts/ERC20Basic.json @@ -0,0 +1,36328 @@ +{ + "contractName": "ERC20Basic", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "constant": true, + "inputs": [ + { + "name": "who", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "to", + "type": "address" + }, + { + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "", + "bytecode": "0x", + "deployedBytecode": "0x", + "sourceMap": "", + "deployedSourceMap": "", + "source": "pragma solidity ^0.4.15;\n\n/**\n * @title Doneth (Doneth)\n * @dev Doneth is a contract that allows shared access to funds\n * in the form of Ether and ERC20 tokens. It is especially relevant\n * to donation based projects. The admins of the contract determine \n * who is a member, and each member gets a number of shares. The \n * number of shares each member has determines how much Ether/ERC20 \n * the member can withdraw from the contract.\n */\n\n/*\n * Ownable\n *\n * Base contract with an owner.\n * Provides onlyOwner modifier, which prevents function from running\n * if it is called by anyone other than the owner.\n */\n\ncontract Ownable {\n address public owner;\n\n function Ownable() public {\n owner = tx.origin;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner || tx.origin == owner);\n _;\n }\n\n function transferOwnership(address newOwner) onlyOwner public {\n if (newOwner != address(0)) {\n owner = newOwner;\n }\n }\n}\n\ncontract Doneth is Ownable {\n using SafeMath for uint256; \n\n bool public initialized;\n\n // Name of the contract\n string public name;\n\n // Sum of all shares allocated to members\n uint256 public totalShares;\n\n // Sum of all withdrawals done by members\n uint256 public totalWithdrawn;\n\n // Block number of when the contract was created\n uint256 public genesisBlockNumber;\n\n // Number of decimal places for floating point division\n uint256 constant public PRECISION = 18;\n\n // Variables for shared expense allocation\n uint256 public sharedExpense;\n uint256 public sharedExpenseWithdrawn;\n\n // Used to keep track of members\n mapping(address => Member) public members;\n address[] public memberKeys;\n struct Member {\n bool exists;\n bool admin;\n uint256 shares;\n uint256 withdrawn;\n string memberName;\n mapping(address => uint256) tokensWithdrawn;\n }\n\n // Used to keep track of ERC20 tokens used and how much withdrawn\n mapping(address => Token) public tokens;\n address[] public tokenKeys;\n struct Token {\n bool exists;\n uint256 totalWithdrawn;\n }\n\n // constructor() public {\n // genesisBlockNumber = block.number;\n // addMember(tx.origin, 1, true, \"\");\n // }\n\n\n function init(string _contractName, string _founderName) public {\n require(!initialized, \"ALREADY INITIALIZED\");\n initialized = true;\n owner = tx.origin;\n genesisBlockNumber = block.number;\n if (bytes(_contractName).length > 21) revert();\n if (bytes(_founderName).length > 21) revert();\n name = _contractName;\n // addMember(founder, 1, true, _founderName);\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = true;\n newMember.memberName = _founderName;\n\n members[tx.origin] = newMember;\n memberKeys.push(tx.origin);\n // addShare(tx.origin, shares);\n totalShares = totalShares.add(1);\n members[tx.origin].shares = members[tx.origin].shares.add(1);\n AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(msg.sender, 1, members[tx.origin].shares);\n }\n\n event Deposit(address from, uint value);\n event Withdraw(address from, uint value, uint256 newTotalWithdrawn);\n event TokenWithdraw(address from, uint value, address token, uint amount);\n event AddShare(address who, uint256 addedShares, uint256 newTotalShares);\n event RemoveShare(address who, uint256 removedShares, uint256 newTotalShares);\n event ChangePrivilege(address who, bool oldValue, bool newValue);\n event ChangeContractName(string oldValue, string newValue);\n event ChangeMemberName(address who, string oldValue, string newValue);\n event ChangeSharedExpense(uint256 contractBalance, uint256 oldValue, uint256 newValue);\n event WithdrawSharedExpense(address from, address to, uint value, uint256 newSharedExpenseWithdrawn);\n\n // Fallback function accepts Ether from donators\n function () public payable {\n Deposit(msg.sender, msg.value);\n }\n\n modifier onlyAdmin() { \n if (msg.sender != owner && !members[msg.sender].admin) revert(); \n _;\n }\n\n modifier onlyExisting(address who) { \n if (!members[who].exists) revert(); \n _;\n }\n\n // Series of getter functions for contract data\n function getMemberCount() public constant returns(uint) {\n return memberKeys.length;\n }\n \n function getMemberAtKey(uint key) public constant returns(address) {\n return memberKeys[key];\n }\n \n function getBalance() public constant returns(uint256 balance) {\n return this.balance;\n }\n \n function getContractInfo() public constant returns(string name, address owner, uint256 genesisBlockNumber, uint256 totalShares, uint256 totalWithdrawn) {\n return (string(name), owner, genesisBlockNumber, totalShares, totalWithdrawn);\n }\n \n function returnMember(address _address) public constant onlyExisting(_address) returns(bool admin, uint256 shares, uint256 withdrawn, string memberName) {\n Member memory m = members[_address];\n return (m.admin, m.shares, m.withdrawn, m.memberName);\n }\n\n function checkERC20Balance(address token) public constant returns(uint256) {\n return ERC20(token).balanceOf(address(this));\n // if (!tokens[token].exists && balance > 0) {\n // tokens[token].exists = true;\n // }\n // return balance;\n }\n\n // Function to add members to the contract \n function addMember(address who, uint256 shares, bool admin, string memberName) public onlyAdmin() {\n // Don't allow the same member to be added twice\n if (members[who].exists) revert();\n if (bytes(memberName).length > 21) revert();\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = admin;\n newMember.memberName = memberName;\n\n members[who] = newMember;\n memberKeys.push(who);\n addShare(who, shares);\n }\n\n function updateMember(address who, uint256 shares, bool isAdmin, string name) public onlyAdmin() {\n if (sha3(members[who].memberName) != sha3(name)) changeMemberName(who, name);\n if (members[who].admin != isAdmin) changeAdminPrivilege(who, isAdmin);\n if (members[who].shares != shares) allocateShares(who, shares);\n }\n\n // Only owner, admin or member can change member's name\n function changeMemberName(address who, string newName) public onlyExisting(who) {\n if (msg.sender != who && msg.sender != owner && !members[msg.sender].admin) revert();\n if (bytes(newName).length > 21) revert();\n ChangeMemberName(who, members[who].memberName, newName);\n members[who].memberName = newName;\n }\n\n function changeAdminPrivilege(address who, bool newValue) public onlyAdmin() {\n ChangePrivilege(who, members[who].admin, newValue);\n members[who].admin = newValue; \n }\n\n // Only admins and owners can change the contract name\n function changeContractName(string newName) public onlyAdmin() {\n if (bytes(newName).length > 21) revert();\n ChangeContractName(name, newName);\n name = newName;\n }\n\n // Shared expense allocation allows admins to withdraw an amount to be used for shared\n // expenses. Shared expense allocation subtracts from the total balance of the contract. \n // Only owner can change this amount.\n function changeSharedExpenseAllocation(uint256 newAllocation) public onlyOwner() {\n if (newAllocation < sharedExpenseWithdrawn) revert();\n if (newAllocation.sub(sharedExpenseWithdrawn) > this.balance) revert();\n\n ChangeSharedExpense(this.balance, sharedExpense, newAllocation);\n sharedExpense = newAllocation;\n }\n\n // Set share amount explicitly by calculating difference then adding or removing accordingly\n function allocateShares(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n uint256 currentShares = members[who].shares;\n if (amount == currentShares) revert();\n if (amount > currentShares) {\n addShare(who, amount.sub(currentShares));\n } else {\n removeShare(who, currentShares.sub(amount));\n }\n }\n\n // Increment the number of shares for a member\n function addShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.add(amount);\n members[who].shares = members[who].shares.add(amount);\n AddShare(who, amount, members[who].shares);\n }\n\n // Decrement the number of shares for a member\n function removeShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.sub(amount);\n members[who].shares = members[who].shares.sub(amount);\n RemoveShare(who, amount, members[who].shares);\n }\n\n // Function for a member to withdraw Ether from the contract proportional\n // to the amount of shares they have. Calculates the totalWithdrawableAmount\n // in Ether based on the member's share and the Ether balance of the contract,\n // then subtracts the amount of Ether that the member has already previously\n // withdrawn.\n function withdraw(uint256 amount) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableAmount(msg.sender);\n if (amount > newTotal.sub(members[msg.sender].withdrawn)) revert();\n \n members[msg.sender].withdrawn = members[msg.sender].withdrawn.add(amount);\n totalWithdrawn = totalWithdrawn.add(amount);\n msg.sender.transfer(amount);\n Withdraw(msg.sender, amount, totalWithdrawn);\n }\n\n // Withdrawal function for ERC20 tokens\n function withdrawToken(uint256 amount, address token) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableTokenAmount(msg.sender, token);\n if (amount > newTotal.sub(members[msg.sender].tokensWithdrawn[token])) revert();\n\n members[msg.sender].tokensWithdrawn[token] = members[msg.sender].tokensWithdrawn[token].add(amount);\n tokens[token].totalWithdrawn = tokens[token].totalWithdrawn.add(amount);\n ERC20(token).transfer(msg.sender, amount);\n TokenWithdraw(msg.sender, amount, token, tokens[token].totalWithdrawn);\n }\n\n // Withdraw from shared expense allocation. Total withdrawable is calculated as \n // sharedExpense minus sharedExpenseWithdrawn. Only Admin can withdraw from shared expense.\n function withdrawSharedExpense(uint256 amount, address to) public onlyAdmin() {\n if (amount > calculateTotalExpenseWithdrawableAmount()) revert();\n \n sharedExpenseWithdrawn = sharedExpenseWithdrawn.add(amount);\n to.transfer(amount);\n WithdrawSharedExpense(msg.sender, to, amount, sharedExpenseWithdrawn);\n }\n\n // Converts from shares to Eth.\n // Ex: 2 shares, 4 total shares, 40 Eth balance\n // 40 Eth / 4 total shares = 10 eth per share * 2 shares = 20 Eth to cash out\n function calculateTotalWithdrawableAmount(address who) public constant onlyExisting(who) returns (uint256) {\n // Total balance to calculate share from = \n // contract balance + totalWithdrawn - sharedExpense + sharedExpenseWithdrawn\n uint256 balanceSum = this.balance.add(totalWithdrawn);\n balanceSum = balanceSum.sub(sharedExpense);\n balanceSum = balanceSum.add(sharedExpenseWithdrawn);\n \n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 ethPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 ethPPN = ethPerSharePPN.mul(members[who].shares);\n uint256 ethVal = ethPPN.div(10**PRECISION); \n return ethVal;\n }\n\n\n function calculateTotalWithdrawableTokenAmount(address who, address token) public constant returns(uint256) {\n uint256 balanceSum = checkERC20Balance(token).add(tokens[token].totalWithdrawn);\n\n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 tokPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 tokPPN = tokPerSharePPN.mul(members[who].shares);\n uint256 tokVal = tokPPN.div(10**PRECISION); \n return tokVal;\n }\n\n function calculateTotalExpenseWithdrawableAmount() public constant returns(uint256) {\n return sharedExpense.sub(sharedExpenseWithdrawn);\n }\n\n // Used for testing\n function delegatePercent(uint256 a, uint256 b, uint256 c) public constant returns (uint256) {\n return a.percent(b, c);\n }\n}\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) public constant returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public constant returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal constant returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal constant returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n\n // Using from SO: https://stackoverflow.com/questions/42738640/division-in-ethereum-solidity/42739843#42739843\n // Adapted to use SafeMath and uint256.\n function percent(uint256 numerator, uint256 denominator, uint256 precision) internal constant returns(uint256 quotient) {\n // caution, check safe-to-multiply here\n uint256 _numerator = mul(numerator, 10 ** (precision+1));\n // with rounding of last digit\n uint256 _quotient = (div(_numerator, denominator) + 5) / 10;\n return (_quotient);\n }\n}\n\n", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T11:15:37.970Z", + "devdoc": { + "methods": {}, + "title": "ERC20Basic" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Migrations.json b/build/contracts/Migrations.json new file mode 100644 index 00000000..b2856e4c --- /dev/null +++ b/build/contracts/Migrations.json @@ -0,0 +1,1395 @@ +{ + "contractName": "Migrations", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "last_completed_migration", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": false, + "inputs": [ + { + "name": "completed", + "type": "uint256" + } + ], + "name": "setCompleted", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "new_address", + "type": "address" + } + ], + "name": "upgrade", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"new_address\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"last_completed_migration\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"completed\",\"type\":\"uint256\"}],\"name\":\"setCompleted\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Migrations.sol\":\"Migrations\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Migrations.sol\":{\"keccak256\":\"0xf035f4f0ba835041bf0190ee6f5fbe344b8fe09c3f53bcd4638eff2b0ae3a228\",\"urls\":[\"bzzr://d401840858781767b934931a89162b6b5a717ebcc565d958914015942f24cdfc\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102f8806100606000396000f300608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b506101576004803603810190808035906020019092919050505061026c565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600a165627a7a7230582048354f137d7696c7f65c91801fa06b14638c456e86bca39fb7cf73906f2c26120029", + "deployedBytecode": "0x608060405260043610610062576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630900f01014610067578063445df0ac146100aa5780638da5cb5b146100d5578063fdacd5761461012c575b600080fd5b34801561007357600080fd5b506100a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610159565b005b3480156100b657600080fd5b506100bf610241565b6040518082815260200191505060405180910390f35b3480156100e157600080fd5b506100ea610247565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561013857600080fd5b506101576004803603810190808035906020019092919050505061026c565b005b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023d578190508073ffffffffffffffffffffffffffffffffffffffff1663fdacd5766001546040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561022457600080fd5b505af1158015610238573d6000803e3d6000fd5b505050505b5050565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102c957806001819055505b505600a165627a7a7230582048354f137d7696c7f65c91801fa06b14638c456e86bca39fb7cf73906f2c26120029", + "sourceMap": "26:488:1:-;;;178:58;8:9:-1;5:2;;;30:1;27;20:12;5:2;178:58:1;221:10;213:5;;:18;;;;;;;;;;;;;;;;;;26:488;;;;;;", + "deployedSourceMap": "26:488:1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;;8:9:-1;5:2;;;30:1;27;20:12;5:2;347:165:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;74:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;74:36:1;;;;;;;;;;;;;;;;;;;;;;;50:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;50:20:1;;;;;;;;;;;;;;;;;;;;;;;;;;;240:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;240:103:1;;;;;;;;;;;;;;;;;;;;;;;;;;347:165;409:19;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:26;;;442:11;409:45;;460:8;:21;;;482:24;;460:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;460:47:1;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;460:47:1;;;;143:26;347:165;;:::o;74:36::-;;;;:::o;50:20::-;;;;;;;;;;;;;:::o;240:103::-;161:5;;;;;;;;;;;147:19;;:10;:19;;;143:26;;;329:9;302:24;:36;;;;143:26;240:103;:::o", + "source": "pragma solidity ^0.4.17;\n\ncontract Migrations {\n address public owner;\n uint public last_completed_migration;\n\n modifier restricted() {\n if (msg.sender == owner) _;\n }\n\n function Migrations() public {\n owner = msg.sender;\n }\n\n function setCompleted(uint completed) public restricted {\n last_completed_migration = completed;\n }\n\n function upgrade(address new_address) public restricted {\n Migrations upgraded = Migrations(new_address);\n upgraded.setCompleted(last_completed_migration);\n }\n}\n", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Migrations.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 1380 + ] + }, + "id": 1381, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1325, + "literals": [ + "solidity", + "^", + "0.4", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "0:24:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1380, + "linearizedBaseContracts": [ + 1380 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1327, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1380, + "src": "50:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "50:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1329, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 1380, + "src": "74:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "74:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 1337, + "nodeType": "Block", + "src": "137:37:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1331, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "147:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "147:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1333, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "161:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "147:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1336, + "nodeType": "IfStatement", + "src": "143:26:1", + "trueBody": { + "id": 1335, + "nodeType": "PlaceholderStatement", + "src": "168:1:1" + } + } + ] + }, + "documentation": null, + "id": 1338, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [], + "src": "134:2:1" + }, + "src": "115:59:1", + "visibility": "internal" + }, + { + "body": { + "id": 1346, + "nodeType": "Block", + "src": "207:29:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1341, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "213:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1342, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "221:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "221:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "213:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1345, + "nodeType": "ExpressionStatement", + "src": "213:18:1" + } + ] + }, + "documentation": null, + "id": 1347, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Migrations", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1339, + "nodeType": "ParameterList", + "parameters": [], + "src": "197:2:1" + }, + "payable": false, + "returnParameters": { + "id": 1340, + "nodeType": "ParameterList", + "parameters": [], + "src": "207:0:1" + }, + "scope": 1380, + "src": "178:58:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1358, + "nodeType": "Block", + "src": "296:47:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1354, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "302:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1355, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1349, + "src": "329:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "302:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1357, + "nodeType": "ExpressionStatement", + "src": "302:36:1" + } + ] + }, + "documentation": null, + "id": 1359, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1352, + "modifierName": { + "argumentTypes": null, + "id": 1351, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1338, + "src": "285:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "285:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1349, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 1359, + "src": "262:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1348, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "262:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "261:16:1" + }, + "payable": false, + "returnParameters": { + "id": 1353, + "nodeType": "ParameterList", + "parameters": [], + "src": "296:0:1" + }, + "scope": 1380, + "src": "240:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1378, + "nodeType": "Block", + "src": "403:109:1", + "statements": [ + { + "assignments": [ + 1367 + ], + "declarations": [ + { + "constant": false, + "id": 1367, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 1379, + "src": "409:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 1366, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1380, + "src": "409:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1371, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1369, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1361, + "src": "442:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1368, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1380, + "src": "431:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$1380_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "431:23:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "409:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1375, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "482:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1372, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1367, + "src": "460:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 1359, + "src": "460:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "460:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1377, + "nodeType": "ExpressionStatement", + "src": "460:47:1" + } + ] + }, + "documentation": null, + "id": 1379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1364, + "modifierName": { + "argumentTypes": null, + "id": 1363, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1338, + "src": "392:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "392:10:1" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1361, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 1379, + "src": "364:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1360, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "364:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "363:21:1" + }, + "payable": false, + "returnParameters": { + "id": 1365, + "nodeType": "ParameterList", + "parameters": [], + "src": "403:0:1" + }, + "scope": 1380, + "src": "347:165:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1381, + "src": "26:488:1" + } + ], + "src": "0:515:1" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Migrations.sol", + "exportedSymbols": { + "Migrations": [ + 1380 + ] + }, + "id": 1381, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1325, + "literals": [ + "solidity", + "^", + "0.4", + ".17" + ], + "nodeType": "PragmaDirective", + "src": "0:24:1" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1380, + "linearizedBaseContracts": [ + 1380 + ], + "name": "Migrations", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1327, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1380, + "src": "50:20:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1326, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "50:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 1329, + "name": "last_completed_migration", + "nodeType": "VariableDeclaration", + "scope": 1380, + "src": "74:36:1", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1328, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "74:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 1337, + "nodeType": "Block", + "src": "137:37:1", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 1334, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1331, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "147:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1332, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "147:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1333, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "161:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "147:19:1", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1336, + "nodeType": "IfStatement", + "src": "143:26:1", + "trueBody": { + "id": 1335, + "nodeType": "PlaceholderStatement", + "src": "168:1:1" + } + } + ] + }, + "documentation": null, + "id": 1338, + "name": "restricted", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 1330, + "nodeType": "ParameterList", + "parameters": [], + "src": "134:2:1" + }, + "src": "115:59:1", + "visibility": "internal" + }, + { + "body": { + "id": 1346, + "nodeType": "Block", + "src": "207:29:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1341, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1327, + "src": "213:5:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1342, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1441, + "src": "221:3:1", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1343, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "221:10:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "213:18:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1345, + "nodeType": "ExpressionStatement", + "src": "213:18:1" + } + ] + }, + "documentation": null, + "id": 1347, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Migrations", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1339, + "nodeType": "ParameterList", + "parameters": [], + "src": "197:2:1" + }, + "payable": false, + "returnParameters": { + "id": 1340, + "nodeType": "ParameterList", + "parameters": [], + "src": "207:0:1" + }, + "scope": 1380, + "src": "178:58:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1358, + "nodeType": "Block", + "src": "296:47:1", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1356, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1354, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "302:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 1355, + "name": "completed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1349, + "src": "329:9:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "302:36:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1357, + "nodeType": "ExpressionStatement", + "src": "302:36:1" + } + ] + }, + "documentation": null, + "id": 1359, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1352, + "modifierName": { + "argumentTypes": null, + "id": 1351, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1338, + "src": "285:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "285:10:1" + } + ], + "name": "setCompleted", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1350, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1349, + "name": "completed", + "nodeType": "VariableDeclaration", + "scope": 1359, + "src": "262:14:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1348, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "262:4:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "261:16:1" + }, + "payable": false, + "returnParameters": { + "id": 1353, + "nodeType": "ParameterList", + "parameters": [], + "src": "296:0:1" + }, + "scope": 1380, + "src": "240:103:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1378, + "nodeType": "Block", + "src": "403:109:1", + "statements": [ + { + "assignments": [ + 1367 + ], + "declarations": [ + { + "constant": false, + "id": 1367, + "name": "upgraded", + "nodeType": "VariableDeclaration", + "scope": 1379, + "src": "409:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + }, + "typeName": { + "contractScope": null, + "id": 1366, + "name": "Migrations", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1380, + "src": "409:10:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1371, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1369, + "name": "new_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1361, + "src": "442:11:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1368, + "name": "Migrations", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1380, + "src": "431:10:1", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_Migrations_$1380_$", + "typeString": "type(contract Migrations)" + } + }, + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "431:23:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "409:45:1" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1375, + "name": "last_completed_migration", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1329, + "src": "482:24:1", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1372, + "name": "upgraded", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1367, + "src": "460:8:1", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Migrations_$1380", + "typeString": "contract Migrations" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "setCompleted", + "nodeType": "MemberAccess", + "referencedDeclaration": 1359, + "src": "460:21:1", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256) external" + } + }, + "id": 1376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "460:47:1", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1377, + "nodeType": "ExpressionStatement", + "src": "460:47:1" + } + ] + }, + "documentation": null, + "id": 1379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 1364, + "modifierName": { + "argumentTypes": null, + "id": 1363, + "name": "restricted", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1338, + "src": "392:10:1", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "392:10:1" + } + ], + "name": "upgrade", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1362, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1361, + "name": "new_address", + "nodeType": "VariableDeclaration", + "scope": 1379, + "src": "364:19:1", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1360, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "364:7:1", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "363:21:1" + }, + "payable": false, + "returnParameters": { + "id": 1365, + "nodeType": "ParameterList", + "parameters": [], + "src": "403:0:1" + }, + "scope": 1380, + "src": "347:165:1", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1381, + "src": "26:488:1" + } + ], + "src": "0:515:1" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "4": { + "events": {}, + "links": {}, + "address": "0x7113347cF4f47fa94539DCeA01dA1B3c9C9bbeAf", + "transactionHash": "0x4c25eae0e67c42ec926c9264bdde7933e0823c9a905e959f3fc8122c45d98996" + } + }, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T11:16:10.932Z", + "networkType": "ethereum", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/Ownable.json b/build/contracts/Ownable.json new file mode 100644 index 00000000..0335f34f --- /dev/null +++ b/build/contracts/Ownable.json @@ -0,0 +1,36284 @@ +{ + "contractName": "Ownable", + "abi": [ + { + "constant": true, + "inputs": [], + "name": "owner", + "outputs": [ + { + "name": "", + "type": "address" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "constant": false, + "inputs": [ + { + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"}],\"devdoc\":{\"methods\":{},\"title\":\"Doneth (Doneth)\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol\":\"Ownable\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol\":{\"keccak256\":\"0xf4cee83d417df0c8d96b5a2c651f061dcec6f27d427f7c1790649772774abdb8\",\"urls\":[\"bzzr://b2a7821b45d082849046709df4c0f691d76d3d1def45d6ba9eb085764fb482cf\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50326000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610268806100606000396000f30060806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a8575b600080fd5b34801561005d57600080fd5b506100666100eb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b506100e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610110565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806101b757506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b15156101c257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561023957806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a72305820db9d9dbc975426da9d647c36ee0af311d4adc69f1f0b8389c69159ef9f3c2df90029", + "deployedBytecode": "0x60806040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a8575b600080fd5b34801561005d57600080fd5b506100666100eb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100b457600080fd5b506100e9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610110565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806101b757506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163273ffffffffffffffffffffffffffffffffffffffff16145b15156101c257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151561023957806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a72305820db9d9dbc975426da9d647c36ee0af311d4adc69f1f0b8389c69159ef9f3c2df90029", + "sourceMap": "617:370:0:-;;;667:60;8:9:-1;5:2;;;30:1;27;20:12;5:2;667:60:0;711:9;703:5;;:17;;;;;;;;;;;;;;;;;;617:370;;;;;;", + "deployedSourceMap": "617:370:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;640:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;640:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;838:147;;8:9:-1;5:2;;;30:1;27;20:12;5:2;838:147:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;640:20;;;;;;;;;;;;;:::o;838:147::-;786:5;;;;;;;;;;;772:19;;:10;:19;;;:41;;;;808:5;;;;;;;;;;;795:18;;:9;:18;;;772:41;764:50;;;;;;;;934:1;914:22;;:8;:22;;;;910:69;;;960:8;952:5;;:16;;;;;;;;;;;;;;;;;;910:69;838:147;:::o", + "source": "pragma solidity ^0.4.15;\n\n/**\n * @title Doneth (Doneth)\n * @dev Doneth is a contract that allows shared access to funds\n * in the form of Ether and ERC20 tokens. It is especially relevant\n * to donation based projects. The admins of the contract determine \n * who is a member, and each member gets a number of shares. The \n * number of shares each member has determines how much Ether/ERC20 \n * the member can withdraw from the contract.\n */\n\n/*\n * Ownable\n *\n * Base contract with an owner.\n * Provides onlyOwner modifier, which prevents function from running\n * if it is called by anyone other than the owner.\n */\n\ncontract Ownable {\n address public owner;\n\n function Ownable() public {\n owner = tx.origin;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner || tx.origin == owner);\n _;\n }\n\n function transferOwnership(address newOwner) onlyOwner public {\n if (newOwner != address(0)) {\n owner = newOwner;\n }\n }\n}\n\ncontract Doneth is Ownable {\n using SafeMath for uint256; \n\n bool public initialized;\n\n // Name of the contract\n string public name;\n\n // Sum of all shares allocated to members\n uint256 public totalShares;\n\n // Sum of all withdrawals done by members\n uint256 public totalWithdrawn;\n\n // Block number of when the contract was created\n uint256 public genesisBlockNumber;\n\n // Number of decimal places for floating point division\n uint256 constant public PRECISION = 18;\n\n // Variables for shared expense allocation\n uint256 public sharedExpense;\n uint256 public sharedExpenseWithdrawn;\n\n // Used to keep track of members\n mapping(address => Member) public members;\n address[] public memberKeys;\n struct Member {\n bool exists;\n bool admin;\n uint256 shares;\n uint256 withdrawn;\n string memberName;\n mapping(address => uint256) tokensWithdrawn;\n }\n\n // Used to keep track of ERC20 tokens used and how much withdrawn\n mapping(address => Token) public tokens;\n address[] public tokenKeys;\n struct Token {\n bool exists;\n uint256 totalWithdrawn;\n }\n\n // constructor() public {\n // genesisBlockNumber = block.number;\n // addMember(tx.origin, 1, true, \"\");\n // }\n\n\n function init(string _contractName, string _founderName) public {\n require(!initialized, \"ALREADY INITIALIZED\");\n initialized = true;\n owner = tx.origin;\n genesisBlockNumber = block.number;\n if (bytes(_contractName).length > 21) revert();\n if (bytes(_founderName).length > 21) revert();\n name = _contractName;\n // addMember(founder, 1, true, _founderName);\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = true;\n newMember.memberName = _founderName;\n\n members[tx.origin] = newMember;\n memberKeys.push(tx.origin);\n // addShare(tx.origin, shares);\n totalShares = totalShares.add(1);\n members[tx.origin].shares = members[tx.origin].shares.add(1);\n AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(msg.sender, 1, members[tx.origin].shares);\n }\n\n event Deposit(address from, uint value);\n event Withdraw(address from, uint value, uint256 newTotalWithdrawn);\n event TokenWithdraw(address from, uint value, address token, uint amount);\n event AddShare(address who, uint256 addedShares, uint256 newTotalShares);\n event RemoveShare(address who, uint256 removedShares, uint256 newTotalShares);\n event ChangePrivilege(address who, bool oldValue, bool newValue);\n event ChangeContractName(string oldValue, string newValue);\n event ChangeMemberName(address who, string oldValue, string newValue);\n event ChangeSharedExpense(uint256 contractBalance, uint256 oldValue, uint256 newValue);\n event WithdrawSharedExpense(address from, address to, uint value, uint256 newSharedExpenseWithdrawn);\n\n // Fallback function accepts Ether from donators\n function () public payable {\n Deposit(msg.sender, msg.value);\n }\n\n modifier onlyAdmin() { \n if (msg.sender != owner && !members[msg.sender].admin) revert(); \n _;\n }\n\n modifier onlyExisting(address who) { \n if (!members[who].exists) revert(); \n _;\n }\n\n // Series of getter functions for contract data\n function getMemberCount() public constant returns(uint) {\n return memberKeys.length;\n }\n \n function getMemberAtKey(uint key) public constant returns(address) {\n return memberKeys[key];\n }\n \n function getBalance() public constant returns(uint256 balance) {\n return this.balance;\n }\n \n function getContractInfo() public constant returns(string name, address owner, uint256 genesisBlockNumber, uint256 totalShares, uint256 totalWithdrawn) {\n return (string(name), owner, genesisBlockNumber, totalShares, totalWithdrawn);\n }\n \n function returnMember(address _address) public constant onlyExisting(_address) returns(bool admin, uint256 shares, uint256 withdrawn, string memberName) {\n Member memory m = members[_address];\n return (m.admin, m.shares, m.withdrawn, m.memberName);\n }\n\n function checkERC20Balance(address token) public constant returns(uint256) {\n return ERC20(token).balanceOf(address(this));\n // if (!tokens[token].exists && balance > 0) {\n // tokens[token].exists = true;\n // }\n // return balance;\n }\n\n // Function to add members to the contract \n function addMember(address who, uint256 shares, bool admin, string memberName) public onlyAdmin() {\n // Don't allow the same member to be added twice\n if (members[who].exists) revert();\n if (bytes(memberName).length > 21) revert();\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = admin;\n newMember.memberName = memberName;\n\n members[who] = newMember;\n memberKeys.push(who);\n addShare(who, shares);\n }\n\n function updateMember(address who, uint256 shares, bool isAdmin, string name) public onlyAdmin() {\n if (sha3(members[who].memberName) != sha3(name)) changeMemberName(who, name);\n if (members[who].admin != isAdmin) changeAdminPrivilege(who, isAdmin);\n if (members[who].shares != shares) allocateShares(who, shares);\n }\n\n // Only owner, admin or member can change member's name\n function changeMemberName(address who, string newName) public onlyExisting(who) {\n if (msg.sender != who && msg.sender != owner && !members[msg.sender].admin) revert();\n if (bytes(newName).length > 21) revert();\n ChangeMemberName(who, members[who].memberName, newName);\n members[who].memberName = newName;\n }\n\n function changeAdminPrivilege(address who, bool newValue) public onlyAdmin() {\n ChangePrivilege(who, members[who].admin, newValue);\n members[who].admin = newValue; \n }\n\n // Only admins and owners can change the contract name\n function changeContractName(string newName) public onlyAdmin() {\n if (bytes(newName).length > 21) revert();\n ChangeContractName(name, newName);\n name = newName;\n }\n\n // Shared expense allocation allows admins to withdraw an amount to be used for shared\n // expenses. Shared expense allocation subtracts from the total balance of the contract. \n // Only owner can change this amount.\n function changeSharedExpenseAllocation(uint256 newAllocation) public onlyOwner() {\n if (newAllocation < sharedExpenseWithdrawn) revert();\n if (newAllocation.sub(sharedExpenseWithdrawn) > this.balance) revert();\n\n ChangeSharedExpense(this.balance, sharedExpense, newAllocation);\n sharedExpense = newAllocation;\n }\n\n // Set share amount explicitly by calculating difference then adding or removing accordingly\n function allocateShares(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n uint256 currentShares = members[who].shares;\n if (amount == currentShares) revert();\n if (amount > currentShares) {\n addShare(who, amount.sub(currentShares));\n } else {\n removeShare(who, currentShares.sub(amount));\n }\n }\n\n // Increment the number of shares for a member\n function addShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.add(amount);\n members[who].shares = members[who].shares.add(amount);\n AddShare(who, amount, members[who].shares);\n }\n\n // Decrement the number of shares for a member\n function removeShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.sub(amount);\n members[who].shares = members[who].shares.sub(amount);\n RemoveShare(who, amount, members[who].shares);\n }\n\n // Function for a member to withdraw Ether from the contract proportional\n // to the amount of shares they have. Calculates the totalWithdrawableAmount\n // in Ether based on the member's share and the Ether balance of the contract,\n // then subtracts the amount of Ether that the member has already previously\n // withdrawn.\n function withdraw(uint256 amount) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableAmount(msg.sender);\n if (amount > newTotal.sub(members[msg.sender].withdrawn)) revert();\n \n members[msg.sender].withdrawn = members[msg.sender].withdrawn.add(amount);\n totalWithdrawn = totalWithdrawn.add(amount);\n msg.sender.transfer(amount);\n Withdraw(msg.sender, amount, totalWithdrawn);\n }\n\n // Withdrawal function for ERC20 tokens\n function withdrawToken(uint256 amount, address token) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableTokenAmount(msg.sender, token);\n if (amount > newTotal.sub(members[msg.sender].tokensWithdrawn[token])) revert();\n\n members[msg.sender].tokensWithdrawn[token] = members[msg.sender].tokensWithdrawn[token].add(amount);\n tokens[token].totalWithdrawn = tokens[token].totalWithdrawn.add(amount);\n ERC20(token).transfer(msg.sender, amount);\n TokenWithdraw(msg.sender, amount, token, tokens[token].totalWithdrawn);\n }\n\n // Withdraw from shared expense allocation. Total withdrawable is calculated as \n // sharedExpense minus sharedExpenseWithdrawn. Only Admin can withdraw from shared expense.\n function withdrawSharedExpense(uint256 amount, address to) public onlyAdmin() {\n if (amount > calculateTotalExpenseWithdrawableAmount()) revert();\n \n sharedExpenseWithdrawn = sharedExpenseWithdrawn.add(amount);\n to.transfer(amount);\n WithdrawSharedExpense(msg.sender, to, amount, sharedExpenseWithdrawn);\n }\n\n // Converts from shares to Eth.\n // Ex: 2 shares, 4 total shares, 40 Eth balance\n // 40 Eth / 4 total shares = 10 eth per share * 2 shares = 20 Eth to cash out\n function calculateTotalWithdrawableAmount(address who) public constant onlyExisting(who) returns (uint256) {\n // Total balance to calculate share from = \n // contract balance + totalWithdrawn - sharedExpense + sharedExpenseWithdrawn\n uint256 balanceSum = this.balance.add(totalWithdrawn);\n balanceSum = balanceSum.sub(sharedExpense);\n balanceSum = balanceSum.add(sharedExpenseWithdrawn);\n \n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 ethPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 ethPPN = ethPerSharePPN.mul(members[who].shares);\n uint256 ethVal = ethPPN.div(10**PRECISION); \n return ethVal;\n }\n\n\n function calculateTotalWithdrawableTokenAmount(address who, address token) public constant returns(uint256) {\n uint256 balanceSum = checkERC20Balance(token).add(tokens[token].totalWithdrawn);\n\n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 tokPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 tokPPN = tokPerSharePPN.mul(members[who].shares);\n uint256 tokVal = tokPPN.div(10**PRECISION); \n return tokVal;\n }\n\n function calculateTotalExpenseWithdrawableAmount() public constant returns(uint256) {\n return sharedExpense.sub(sharedExpenseWithdrawn);\n }\n\n // Used for testing\n function delegatePercent(uint256 a, uint256 b, uint256 c) public constant returns (uint256) {\n return a.percent(b, c);\n }\n}\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) public constant returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public constant returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal constant returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal constant returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n\n // Using from SO: https://stackoverflow.com/questions/42738640/division-in-ethereum-solidity/42739843#42739843\n // Adapted to use SafeMath and uint256.\n function percent(uint256 numerator, uint256 denominator, uint256 precision) internal constant returns(uint256 quotient) {\n // caution, check safe-to-multiply here\n uint256 _numerator = mul(numerator, 10 ** (precision+1));\n // with rounding of last digit\n uint256 _quotient = (div(_numerator, denominator) + 5) / 10;\n return (_quotient);\n }\n}\n\n", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T11:15:37.985Z", + "devdoc": { + "methods": {}, + "title": "Doneth (Doneth)" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/ProxyFactory.json b/build/contracts/ProxyFactory.json new file mode 100644 index 00000000..2f79470c --- /dev/null +++ b/build/contracts/ProxyFactory.json @@ -0,0 +1,1309 @@ +{ + "contractName": "ProxyFactory", + "abi": [ + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "proxyAddress", + "type": "address" + }, + { + "indexed": false, + "name": "targetAddress", + "type": "address" + } + ], + "name": "ProxyDeployed", + "type": "event" + }, + { + "constant": false, + "inputs": [ + { + "name": "_target", + "type": "address" + }, + { + "name": "_data", + "type": "bytes" + } + ], + "name": "createProxy", + "outputs": [ + { + "name": "proxyContract", + "type": "address" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + } + ], + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":false,\"inputs\":[{\"name\":\"_target\",\"type\":\"address\"},{\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"createProxy\",\"outputs\":[{\"name\":\"proxyContract\",\"type\":\"address\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"proxyAddress\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"targetAddress\",\"type\":\"address\"}],\"name\":\"ProxyDeployed\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/ProxyFactory.sol\":\"ProxyFactory\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/ProxyFactory.sol\":{\"keccak256\":\"0x2a2c682f319e95748639cac0262c5f33c8ce89b193b60cdaaf8a88e17332e125\",\"urls\":[\"bzzr://ac7004e872d3451d71832128adbee2dca62c44a9bafdb954d7822e95937cd7ac\"]}},\"version\":1}", + "bytecode": "0x608060405234801561001057600080fd5b50610266806100206000396000f300608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806361b69abd14610046575b600080fd5b6100c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610102565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600061010e83836101ad565b90507f3d2489efb661e8b1c3679865db649ca1de61d76a71184a1234de2e55786a6aad8184604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a192915050565b600060405183600b82015276603160008181600b9039f360008080808036809280377360098203527f5af43d828181803e808314602f57f35bfd000000000000000000000000000000602b820152603c816000f09150813b151561021057600080fd5b82518015151561023257600080826020870134875af1151561023157600080fd5b5b5050929150505600a165627a7a723058201e34797d8c6110fc28eff491e24e8a9a446e4fa64fdcca80881321658372c2450029", + "deployedBytecode": "0x608060405260043610610041576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806361b69abd14610046575b600080fd5b6100c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290505050610102565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600061010e83836101ad565b90507f3d2489efb661e8b1c3679865db649ca1de61d76a71184a1234de2e55786a6aad8184604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a192915050565b600060405183600b82015276603160008181600b9039f360008080808036809280377360098203527f5af43d828181803e808314602f57f35bfd000000000000000000000000000000602b820152603c816000f09150813b151561021057600080fd5b82518015151561023257600080826020870134875af1151561023157600080fd5b5b5050929150505600a165627a7a723058201e34797d8c6110fc28eff491e24e8a9a446e4fa64fdcca80881321658372c2450029", + "sourceMap": "1907:1814:2:-;;;1966:38;8:9:-1;5:2;;;30:1;27;20:12;5:2;1966:38:2;1907:1814;;;;;;", + "deployedSourceMap": "1907:1814:2:-;;;;;;;;;;;;;;;;;;;;;;;;2081:309;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2180:21;2304:31;2320:7;2329:5;2304:15;:31::i;:::-;2288:47;;2346:37;2360:13;2375:7;2346:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2081:309;;;;:::o;2396:1323::-;2485:21;2571:4;2565:11;2681:7;2674:4;2660:12;2656:23;2649:40;2849:66;2842:4;2828:12;2824:23;2817:99;3059:66;3052:4;3038:12;3034:23;3027:99;3227:2;3213:12;3210:1;3203:27;3186:44;;3290:13;3278:26;3271:34;3268:2;;;3334:1;3331;3324:12;3268:2;3487:5;3481:12;3523:10;3516:18;3509:26;3506:2;;;3633:1;3630;3618:10;3611:4;3604:5;3600:16;3589:9;3574:13;3569:3;3564:71;3557:79;3554:2;;;3669:1;3666;3659:12;3554:2;3506;2531:1182;;;;;;:::o", + "source": "/***\n* Shoutouts:\n*\n* Bytecode origin https://www.reddit.com/r/ethereum/comments/6ic49q/any_assembly_programmers_willing_to_write_a/dj5ceuw/\n* Modified version of Vitalik's https://www.reddit.com/r/ethereum/comments/6c1jui/delegatecall_forwarders_how_to_save_5098_on/\n* Credits to Jorge Izquierdo (@izqui) for coming up with this design here: https://gist.github.com/izqui/7f904443e6d19c1ab52ec7f5ad46b3a8\n* Credits to Stefan George (@Georgi87) for inspiration for many of the improvements from Gnosis Safe: https://github.com/gnosis/gnosis-safe-contracts\n*\n* This version has many improvements over the original @izqui's library like using REVERT instead of THROWing on failed calls.\n* It also implements the awesome design pattern for initializing code as seen in Gnosis Safe Factory: https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/ProxyFactory.sol\n* but unlike this last one it doesn't require that you waste storage on both the proxy and the proxied contracts (v. https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/Proxy.sol#L8 & https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol#L14)\n*\n*\n* v0.0.2\n* The proxy is now only 60 bytes long in total. Constructor included.\n* No functionalities were added. The change was just to make the proxy leaner.\n*\n* v0.0.3\n* Thanks @dacarley for noticing the incorrect check for the subsequent call to the proxy. πŸ™Œ\n* Note: I'm creating a new version of this that doesn't need that one call.\n* Will add tests and put this in its own repository soonβ„’.\n*\n* v0.0.4\n* All the merit in this fix + update of the factory is @dacarley 's. πŸ™Œ\n* Thank you! πŸ˜„\n*\n* Potential updates can be found at https://gist.github.com/GNSPS/ba7b88565c947cfd781d44cf469c2ddb\n*\n***/\n\npragma solidity ^0.4.19;\n\n\n/* solhint-disable no-inline-assembly, indent, state-visibility, avoid-low-level-calls */\n\ncontract ProxyFactory {\n // address public target;\n\n function ProxyFactory() public {\n }\n\n event ProxyDeployed(address proxyAddress, address targetAddress);\n\n function createProxy(address _target, bytes _data)\n public\n payable\n returns (address proxyContract)\n {\n // address _target = ControllerPointer(target).getERC20Main();\n proxyContract = createProxyImpl(_target, _data);\n\n ProxyDeployed(proxyContract, _target);\n }\n\n function createProxyImpl(address _target, bytes _data)\n internal\n returns (address proxyContract)\n {\n assembly {\n let contractCode := mload(0x40) // Find empty storage location using \"free memory pointer\"\n\n mstore(add(contractCode, 0x0b), _target) // Add target address, with a 11 bytes [i.e. 23 - (32 - 20)] offset to later accomodate first part of the bytecode\n mstore(sub(contractCode, 0x09), 0x000000000000000000603160008181600b9039f3600080808080368092803773) // First part of the bytecode, shifted left by 9 bytes, overwrites left padding of target address\n mstore(add(contractCode, 0x2b), 0x5af43d828181803e808314602f57f35bfd000000000000000000000000000000) // Final part of bytecode, offset by 43 bytes\n\n proxyContract := create(0, contractCode, 60) // total length 60 bytes\n if iszero(extcodesize(proxyContract)) {\n revert(0, 0)\n }\n\n // check if the _data.length > 0 and if it is forward it to the newly created contract\n let dataLength := mload(_data)\n if iszero(iszero(dataLength)) {\n if iszero(call(gas, proxyContract, callvalue, add(_data, 0x20), dataLength, 0, 0)) {\n revert(0, 0)\n }\n }\n }\n }\n}", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/ProxyFactory.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/ProxyFactory.sol", + "exportedSymbols": { + "ProxyFactory": [ + 1426 + ] + }, + "id": 1427, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1382, + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ], + "nodeType": "PragmaDirective", + "src": "1789:24:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1426, + "linearizedBaseContracts": [ + 1426 + ], + "name": "ProxyFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1385, + "nodeType": "Block", + "src": "1997:7:2", + "statements": [] + }, + "documentation": null, + "id": 1386, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "ProxyFactory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1383, + "nodeType": "ParameterList", + "parameters": [], + "src": "1987:2:2" + }, + "payable": false, + "returnParameters": { + "id": 1384, + "nodeType": "ParameterList", + "parameters": [], + "src": "1997:0:2" + }, + "scope": 1426, + "src": "1966:38:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1392, + "name": "ProxyDeployed", + "nodeType": "EventDefinition", + "parameters": { + "id": 1391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1388, + "indexed": false, + "name": "proxyAddress", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "2030:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2030:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1390, + "indexed": false, + "name": "targetAddress", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "2052:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2052:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2029:45:2" + }, + "src": "2010:65:2" + }, + { + "body": { + "id": 1413, + "nodeType": "Block", + "src": "2207:183:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1401, + "name": "proxyContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "2288:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1403, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1394, + "src": "2320:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1404, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "2329:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1402, + "name": "createProxyImpl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1425, + "src": "2304:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_address_$", + "typeString": "function (address,bytes memory) returns (address)" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2304:31:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2288:47:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1407, + "nodeType": "ExpressionStatement", + "src": "2288:47:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1409, + "name": "proxyContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "2360:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1410, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1394, + "src": "2375:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1408, + "name": "ProxyDeployed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1392, + "src": "2346:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2346:37:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1412, + "nodeType": "ExpressionStatement", + "src": "2346:37:2" + } + ] + }, + "documentation": null, + "id": 1414, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "createProxy", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1394, + "name": "_target", + "nodeType": "VariableDeclaration", + "scope": 1414, + "src": "2102:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2102:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1396, + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 1414, + "src": "2119:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1395, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2119:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2101:30:2" + }, + "payable": true, + "returnParameters": { + "id": 1400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1399, + "name": "proxyContract", + "nodeType": "VariableDeclaration", + "scope": 1414, + "src": "2180:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2180:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2179:23:2" + }, + "scope": 1426, + "src": "2081:309:2", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1424, + "nodeType": "Block", + "src": "2512:1207:2", + "statements": [ + { + "externalReferences": [ + { + "proxyContract": { + "declaration": 1421, + "isOffset": false, + "isSlot": false, + "src": "3186:13:2", + "valueSize": 1 + } + }, + { + "_target": { + "declaration": 1416, + "isOffset": false, + "isSlot": false, + "src": "2681:7:2", + "valueSize": 1 + } + }, + { + "_data": { + "declaration": 1418, + "isOffset": false, + "isSlot": false, + "src": "3487:5:2", + "valueSize": 1 + } + }, + { + "proxyContract": { + "declaration": 1421, + "isOffset": false, + "isSlot": false, + "src": "3290:13:2", + "valueSize": 1 + } + }, + { + "proxyContract": { + "declaration": 1421, + "isOffset": false, + "isSlot": false, + "src": "3574:13:2", + "valueSize": 1 + } + }, + { + "_data": { + "declaration": 1418, + "isOffset": false, + "isSlot": false, + "src": "3604:5:2", + "valueSize": 1 + } + } + ], + "id": 1423, + "nodeType": "InlineAssembly", + "operations": "{\n let contractCode := mload(0x40)\n mstore(add(contractCode, 0x0b), _target)\n mstore(sub(contractCode, 0x09), 0x000000000000000000603160008181600b9039f3600080808080368092803773)\n mstore(add(contractCode, 0x2b), 0x5af43d828181803e808314602f57f35bfd000000000000000000000000000000)\n proxyContract := create(0, contractCode, 60)\n if iszero(extcodesize(proxyContract))\n {\n revert(0, 0)\n }\n let dataLength := mload(_data)\n if iszero(iszero(dataLength))\n {\n if iszero(call(gas(), proxyContract, callvalue(), add(_data, 0x20), dataLength, 0, 0))\n {\n revert(0, 0)\n }\n }\n}", + "src": "2522:1197:2" + } + ] + }, + "documentation": null, + "id": 1425, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "createProxyImpl", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1416, + "name": "_target", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "2421:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1415, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2421:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1418, + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "2438:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1417, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2438:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2420:30:2" + }, + "payable": false, + "returnParameters": { + "id": 1422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1421, + "name": "proxyContract", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "2485:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1420, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2485:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2484:23:2" + }, + "scope": 1426, + "src": "2396:1323:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1427, + "src": "1907:1814:2" + } + ], + "src": "1789:1932:2" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/ProxyFactory.sol", + "exportedSymbols": { + "ProxyFactory": [ + 1426 + ] + }, + "id": 1427, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1382, + "literals": [ + "solidity", + "^", + "0.4", + ".19" + ], + "nodeType": "PragmaDirective", + "src": "1789:24:2" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1426, + "linearizedBaseContracts": [ + 1426 + ], + "name": "ProxyFactory", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1385, + "nodeType": "Block", + "src": "1997:7:2", + "statements": [] + }, + "documentation": null, + "id": 1386, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "ProxyFactory", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1383, + "nodeType": "ParameterList", + "parameters": [], + "src": "1987:2:2" + }, + "payable": false, + "returnParameters": { + "id": 1384, + "nodeType": "ParameterList", + "parameters": [], + "src": "1997:0:2" + }, + "scope": 1426, + "src": "1966:38:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1392, + "name": "ProxyDeployed", + "nodeType": "EventDefinition", + "parameters": { + "id": 1391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1388, + "indexed": false, + "name": "proxyAddress", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "2030:20:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1387, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2030:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1390, + "indexed": false, + "name": "targetAddress", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "2052:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1389, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2052:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2029:45:2" + }, + "src": "2010:65:2" + }, + { + "body": { + "id": 1413, + "nodeType": "Block", + "src": "2207:183:2", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 1406, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1401, + "name": "proxyContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "2288:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1403, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1394, + "src": "2320:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1404, + "name": "_data", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1396, + "src": "2329:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes memory" + } + ], + "id": 1402, + "name": "createProxyImpl", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1425, + "src": "2304:15:2", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bytes_memory_ptr_$returns$_t_address_$", + "typeString": "function (address,bytes memory) returns (address)" + } + }, + "id": 1405, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2304:31:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2288:47:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1407, + "nodeType": "ExpressionStatement", + "src": "2288:47:2" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1409, + "name": "proxyContract", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1399, + "src": "2360:13:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1410, + "name": "_target", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1394, + "src": "2375:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1408, + "name": "ProxyDeployed", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1392, + "src": "2346:13:2", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$returns$__$", + "typeString": "function (address,address)" + } + }, + "id": 1411, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2346:37:2", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1412, + "nodeType": "ExpressionStatement", + "src": "2346:37:2" + } + ] + }, + "documentation": null, + "id": 1414, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "createProxy", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1397, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1394, + "name": "_target", + "nodeType": "VariableDeclaration", + "scope": 1414, + "src": "2102:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1393, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2102:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1396, + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 1414, + "src": "2119:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1395, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2119:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2101:30:2" + }, + "payable": true, + "returnParameters": { + "id": 1400, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1399, + "name": "proxyContract", + "nodeType": "VariableDeclaration", + "scope": 1414, + "src": "2180:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1398, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2180:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2179:23:2" + }, + "scope": 1426, + "src": "2081:309:2", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1424, + "nodeType": "Block", + "src": "2512:1207:2", + "statements": [ + { + "externalReferences": [ + { + "proxyContract": { + "declaration": 1421, + "isOffset": false, + "isSlot": false, + "src": "3186:13:2", + "valueSize": 1 + } + }, + { + "_target": { + "declaration": 1416, + "isOffset": false, + "isSlot": false, + "src": "2681:7:2", + "valueSize": 1 + } + }, + { + "_data": { + "declaration": 1418, + "isOffset": false, + "isSlot": false, + "src": "3487:5:2", + "valueSize": 1 + } + }, + { + "proxyContract": { + "declaration": 1421, + "isOffset": false, + "isSlot": false, + "src": "3290:13:2", + "valueSize": 1 + } + }, + { + "proxyContract": { + "declaration": 1421, + "isOffset": false, + "isSlot": false, + "src": "3574:13:2", + "valueSize": 1 + } + }, + { + "_data": { + "declaration": 1418, + "isOffset": false, + "isSlot": false, + "src": "3604:5:2", + "valueSize": 1 + } + } + ], + "id": 1423, + "nodeType": "InlineAssembly", + "operations": "{\n let contractCode := mload(0x40)\n mstore(add(contractCode, 0x0b), _target)\n mstore(sub(contractCode, 0x09), 0x000000000000000000603160008181600b9039f3600080808080368092803773)\n mstore(add(contractCode, 0x2b), 0x5af43d828181803e808314602f57f35bfd000000000000000000000000000000)\n proxyContract := create(0, contractCode, 60)\n if iszero(extcodesize(proxyContract))\n {\n revert(0, 0)\n }\n let dataLength := mload(_data)\n if iszero(iszero(dataLength))\n {\n if iszero(call(gas(), proxyContract, callvalue(), add(_data, 0x20), dataLength, 0, 0))\n {\n revert(0, 0)\n }\n }\n}", + "src": "2522:1197:2" + } + ] + }, + "documentation": null, + "id": 1425, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "createProxyImpl", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1419, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1416, + "name": "_target", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "2421:15:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1415, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2421:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1418, + "name": "_data", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "2438:11:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory_ptr", + "typeString": "bytes" + }, + "typeName": { + "id": 1417, + "name": "bytes", + "nodeType": "ElementaryTypeName", + "src": "2438:5:2", + "typeDescriptions": { + "typeIdentifier": "t_bytes_storage_ptr", + "typeString": "bytes" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2420:30:2" + }, + "payable": false, + "returnParameters": { + "id": 1422, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1421, + "name": "proxyContract", + "nodeType": "VariableDeclaration", + "scope": 1425, + "src": "2485:21:2", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1420, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2485:7:2", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2484:23:2" + }, + "scope": 1426, + "src": "2396:1323:2", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1427, + "src": "1907:1814:2" + } + ], + "src": "1789:1932:2" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": { + "4": { + "events": { + "0x3d2489efb661e8b1c3679865db649ca1de61d76a71184a1234de2e55786a6aad": { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "proxyAddress", + "type": "address" + }, + { + "indexed": false, + "name": "targetAddress", + "type": "address" + } + ], + "name": "ProxyDeployed", + "type": "event" + } + }, + "links": {}, + "address": "0xe917053D93dD36a4E66c4BdFB96eD098983B579d", + "transactionHash": "0xc364e5cc20a56d2dcabd0d40a4d12fc12c153f3c592b34cb6224d09c6839fbe2" + } + }, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T10:41:09.778Z", + "networkType": "ethereum", + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/build/contracts/SafeMath.json b/build/contracts/SafeMath.json new file mode 100644 index 00000000..f90eae35 --- /dev/null +++ b/build/contracts/SafeMath.json @@ -0,0 +1,36249 @@ +{ + "contractName": "SafeMath", + "abi": [], + "metadata": "{\"compiler\":{\"version\":\"0.4.24+commit.e67f0147\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"methods\":{},\"title\":\"SafeMath\"},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol\":\"SafeMath\"},\"evmVersion\":\"byzantium\",\"libraries\":{},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol\":{\"keccak256\":\"0xf4cee83d417df0c8d96b5a2c651f061dcec6f27d427f7c1790649772774abdb8\",\"urls\":[\"bzzr://b2a7821b45d082849046709df4c0f691d76d3d1def45d6ba9eb085764fb482cf\"]}},\"version\":1}", + "bytecode": "0x604c602c600b82828239805160001a60731460008114601c57601e565bfe5b5030600052607381538281f30073000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058206e24702f9f27b05a799aca80469d473e9f2985c9972e9b65fe4e32fba06021f40029", + "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fd00a165627a7a723058206e24702f9f27b05a799aca80469d473e9f2985c9972e9b65fe4e32fba06021f40029", + "sourceMap": "13723:1304:0:-;;132:2:-1;166:7;155:9;146:7;137:37;252:7;246:14;243:1;238:23;232:4;229:33;270:1;265:20;;;;222:63;;265:20;274:9;222:63;;298:9;295:1;288:20;328:4;319:7;311:22;352:7;343;336:24", + "deployedSourceMap": "13723:1304:0:-;;;;;;;;", + "source": "pragma solidity ^0.4.15;\n\n/**\n * @title Doneth (Doneth)\n * @dev Doneth is a contract that allows shared access to funds\n * in the form of Ether and ERC20 tokens. It is especially relevant\n * to donation based projects. The admins of the contract determine \n * who is a member, and each member gets a number of shares. The \n * number of shares each member has determines how much Ether/ERC20 \n * the member can withdraw from the contract.\n */\n\n/*\n * Ownable\n *\n * Base contract with an owner.\n * Provides onlyOwner modifier, which prevents function from running\n * if it is called by anyone other than the owner.\n */\n\ncontract Ownable {\n address public owner;\n\n function Ownable() public {\n owner = tx.origin;\n }\n\n modifier onlyOwner() {\n require(msg.sender == owner || tx.origin == owner);\n _;\n }\n\n function transferOwnership(address newOwner) onlyOwner public {\n if (newOwner != address(0)) {\n owner = newOwner;\n }\n }\n}\n\ncontract Doneth is Ownable {\n using SafeMath for uint256; \n\n bool public initialized;\n\n // Name of the contract\n string public name;\n\n // Sum of all shares allocated to members\n uint256 public totalShares;\n\n // Sum of all withdrawals done by members\n uint256 public totalWithdrawn;\n\n // Block number of when the contract was created\n uint256 public genesisBlockNumber;\n\n // Number of decimal places for floating point division\n uint256 constant public PRECISION = 18;\n\n // Variables for shared expense allocation\n uint256 public sharedExpense;\n uint256 public sharedExpenseWithdrawn;\n\n // Used to keep track of members\n mapping(address => Member) public members;\n address[] public memberKeys;\n struct Member {\n bool exists;\n bool admin;\n uint256 shares;\n uint256 withdrawn;\n string memberName;\n mapping(address => uint256) tokensWithdrawn;\n }\n\n // Used to keep track of ERC20 tokens used and how much withdrawn\n mapping(address => Token) public tokens;\n address[] public tokenKeys;\n struct Token {\n bool exists;\n uint256 totalWithdrawn;\n }\n\n // constructor() public {\n // genesisBlockNumber = block.number;\n // addMember(tx.origin, 1, true, \"\");\n // }\n\n\n function init(string _contractName, string _founderName) public {\n require(!initialized, \"ALREADY INITIALIZED\");\n initialized = true;\n owner = tx.origin;\n genesisBlockNumber = block.number;\n if (bytes(_contractName).length > 21) revert();\n if (bytes(_founderName).length > 21) revert();\n name = _contractName;\n // addMember(founder, 1, true, _founderName);\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = true;\n newMember.memberName = _founderName;\n\n members[tx.origin] = newMember;\n memberKeys.push(tx.origin);\n // addShare(tx.origin, shares);\n totalShares = totalShares.add(1);\n members[tx.origin].shares = members[tx.origin].shares.add(1);\n AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(tx.origin, 1, members[tx.origin].shares);\n // AddShare(msg.sender, 1, members[tx.origin].shares);\n }\n\n event Deposit(address from, uint value);\n event Withdraw(address from, uint value, uint256 newTotalWithdrawn);\n event TokenWithdraw(address from, uint value, address token, uint amount);\n event AddShare(address who, uint256 addedShares, uint256 newTotalShares);\n event RemoveShare(address who, uint256 removedShares, uint256 newTotalShares);\n event ChangePrivilege(address who, bool oldValue, bool newValue);\n event ChangeContractName(string oldValue, string newValue);\n event ChangeMemberName(address who, string oldValue, string newValue);\n event ChangeSharedExpense(uint256 contractBalance, uint256 oldValue, uint256 newValue);\n event WithdrawSharedExpense(address from, address to, uint value, uint256 newSharedExpenseWithdrawn);\n\n // Fallback function accepts Ether from donators\n function () public payable {\n Deposit(msg.sender, msg.value);\n }\n\n modifier onlyAdmin() { \n if (msg.sender != owner && !members[msg.sender].admin) revert(); \n _;\n }\n\n modifier onlyExisting(address who) { \n if (!members[who].exists) revert(); \n _;\n }\n\n // Series of getter functions for contract data\n function getMemberCount() public constant returns(uint) {\n return memberKeys.length;\n }\n \n function getMemberAtKey(uint key) public constant returns(address) {\n return memberKeys[key];\n }\n \n function getBalance() public constant returns(uint256 balance) {\n return this.balance;\n }\n \n function getContractInfo() public constant returns(string name, address owner, uint256 genesisBlockNumber, uint256 totalShares, uint256 totalWithdrawn) {\n return (string(name), owner, genesisBlockNumber, totalShares, totalWithdrawn);\n }\n \n function returnMember(address _address) public constant onlyExisting(_address) returns(bool admin, uint256 shares, uint256 withdrawn, string memberName) {\n Member memory m = members[_address];\n return (m.admin, m.shares, m.withdrawn, m.memberName);\n }\n\n function checkERC20Balance(address token) public constant returns(uint256) {\n return ERC20(token).balanceOf(address(this));\n // if (!tokens[token].exists && balance > 0) {\n // tokens[token].exists = true;\n // }\n // return balance;\n }\n\n // Function to add members to the contract \n function addMember(address who, uint256 shares, bool admin, string memberName) public onlyAdmin() {\n // Don't allow the same member to be added twice\n if (members[who].exists) revert();\n if (bytes(memberName).length > 21) revert();\n\n Member memory newMember;\n newMember.exists = true;\n newMember.admin = admin;\n newMember.memberName = memberName;\n\n members[who] = newMember;\n memberKeys.push(who);\n addShare(who, shares);\n }\n\n function updateMember(address who, uint256 shares, bool isAdmin, string name) public onlyAdmin() {\n if (sha3(members[who].memberName) != sha3(name)) changeMemberName(who, name);\n if (members[who].admin != isAdmin) changeAdminPrivilege(who, isAdmin);\n if (members[who].shares != shares) allocateShares(who, shares);\n }\n\n // Only owner, admin or member can change member's name\n function changeMemberName(address who, string newName) public onlyExisting(who) {\n if (msg.sender != who && msg.sender != owner && !members[msg.sender].admin) revert();\n if (bytes(newName).length > 21) revert();\n ChangeMemberName(who, members[who].memberName, newName);\n members[who].memberName = newName;\n }\n\n function changeAdminPrivilege(address who, bool newValue) public onlyAdmin() {\n ChangePrivilege(who, members[who].admin, newValue);\n members[who].admin = newValue; \n }\n\n // Only admins and owners can change the contract name\n function changeContractName(string newName) public onlyAdmin() {\n if (bytes(newName).length > 21) revert();\n ChangeContractName(name, newName);\n name = newName;\n }\n\n // Shared expense allocation allows admins to withdraw an amount to be used for shared\n // expenses. Shared expense allocation subtracts from the total balance of the contract. \n // Only owner can change this amount.\n function changeSharedExpenseAllocation(uint256 newAllocation) public onlyOwner() {\n if (newAllocation < sharedExpenseWithdrawn) revert();\n if (newAllocation.sub(sharedExpenseWithdrawn) > this.balance) revert();\n\n ChangeSharedExpense(this.balance, sharedExpense, newAllocation);\n sharedExpense = newAllocation;\n }\n\n // Set share amount explicitly by calculating difference then adding or removing accordingly\n function allocateShares(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n uint256 currentShares = members[who].shares;\n if (amount == currentShares) revert();\n if (amount > currentShares) {\n addShare(who, amount.sub(currentShares));\n } else {\n removeShare(who, currentShares.sub(amount));\n }\n }\n\n // Increment the number of shares for a member\n function addShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.add(amount);\n members[who].shares = members[who].shares.add(amount);\n AddShare(who, amount, members[who].shares);\n }\n\n // Decrement the number of shares for a member\n function removeShare(address who, uint256 amount) public onlyAdmin() onlyExisting(who) {\n totalShares = totalShares.sub(amount);\n members[who].shares = members[who].shares.sub(amount);\n RemoveShare(who, amount, members[who].shares);\n }\n\n // Function for a member to withdraw Ether from the contract proportional\n // to the amount of shares they have. Calculates the totalWithdrawableAmount\n // in Ether based on the member's share and the Ether balance of the contract,\n // then subtracts the amount of Ether that the member has already previously\n // withdrawn.\n function withdraw(uint256 amount) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableAmount(msg.sender);\n if (amount > newTotal.sub(members[msg.sender].withdrawn)) revert();\n \n members[msg.sender].withdrawn = members[msg.sender].withdrawn.add(amount);\n totalWithdrawn = totalWithdrawn.add(amount);\n msg.sender.transfer(amount);\n Withdraw(msg.sender, amount, totalWithdrawn);\n }\n\n // Withdrawal function for ERC20 tokens\n function withdrawToken(uint256 amount, address token) public onlyExisting(msg.sender) {\n uint256 newTotal = calculateTotalWithdrawableTokenAmount(msg.sender, token);\n if (amount > newTotal.sub(members[msg.sender].tokensWithdrawn[token])) revert();\n\n members[msg.sender].tokensWithdrawn[token] = members[msg.sender].tokensWithdrawn[token].add(amount);\n tokens[token].totalWithdrawn = tokens[token].totalWithdrawn.add(amount);\n ERC20(token).transfer(msg.sender, amount);\n TokenWithdraw(msg.sender, amount, token, tokens[token].totalWithdrawn);\n }\n\n // Withdraw from shared expense allocation. Total withdrawable is calculated as \n // sharedExpense minus sharedExpenseWithdrawn. Only Admin can withdraw from shared expense.\n function withdrawSharedExpense(uint256 amount, address to) public onlyAdmin() {\n if (amount > calculateTotalExpenseWithdrawableAmount()) revert();\n \n sharedExpenseWithdrawn = sharedExpenseWithdrawn.add(amount);\n to.transfer(amount);\n WithdrawSharedExpense(msg.sender, to, amount, sharedExpenseWithdrawn);\n }\n\n // Converts from shares to Eth.\n // Ex: 2 shares, 4 total shares, 40 Eth balance\n // 40 Eth / 4 total shares = 10 eth per share * 2 shares = 20 Eth to cash out\n function calculateTotalWithdrawableAmount(address who) public constant onlyExisting(who) returns (uint256) {\n // Total balance to calculate share from = \n // contract balance + totalWithdrawn - sharedExpense + sharedExpenseWithdrawn\n uint256 balanceSum = this.balance.add(totalWithdrawn);\n balanceSum = balanceSum.sub(sharedExpense);\n balanceSum = balanceSum.add(sharedExpenseWithdrawn);\n \n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 ethPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 ethPPN = ethPerSharePPN.mul(members[who].shares);\n uint256 ethVal = ethPPN.div(10**PRECISION); \n return ethVal;\n }\n\n\n function calculateTotalWithdrawableTokenAmount(address who, address token) public constant returns(uint256) {\n uint256 balanceSum = checkERC20Balance(token).add(tokens[token].totalWithdrawn);\n\n // Need to use parts-per notation to compute percentages for lack of floating point division\n uint256 tokPerSharePPN = balanceSum.percent(totalShares, PRECISION); \n uint256 tokPPN = tokPerSharePPN.mul(members[who].shares);\n uint256 tokVal = tokPPN.div(10**PRECISION); \n return tokVal;\n }\n\n function calculateTotalExpenseWithdrawableAmount() public constant returns(uint256) {\n return sharedExpense.sub(sharedExpenseWithdrawn);\n }\n\n // Used for testing\n function delegatePercent(uint256 a, uint256 b, uint256 c) public constant returns (uint256) {\n return a.percent(b, c);\n }\n}\n\n/**\n * @title ERC20Basic\n * @dev Simpler version of ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/179\n */\ncontract ERC20Basic {\n uint256 public totalSupply;\n function balanceOf(address who) public constant returns (uint256);\n function transfer(address to, uint256 value) public returns (bool);\n event Transfer(address indexed from, address indexed to, uint256 value);\n}\n\n\n/**\n * @title ERC20 interface\n * @dev see https://github.com/ethereum/EIPs/issues/20\n */\ncontract ERC20 is ERC20Basic {\n function allowance(address owner, address spender) public constant returns (uint256);\n function transferFrom(address from, address to, uint256 value) public returns (bool);\n function approve(address spender, uint256 value) public returns (bool);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n\n\n/**\n * @title SafeMath\n * @dev Math operations with safety checks that throw on error\n */\nlibrary SafeMath {\n function mul(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a * b;\n assert(a == 0 || c / a == b);\n return c;\n }\n\n function div(uint256 a, uint256 b) internal constant returns (uint256) {\n // assert(b > 0); // Solidity automatically throws when dividing by 0\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n return c;\n }\n\n function sub(uint256 a, uint256 b) internal constant returns (uint256) {\n assert(b <= a);\n return a - b;\n }\n\n function add(uint256 a, uint256 b) internal constant returns (uint256) {\n uint256 c = a + b;\n assert(c >= a);\n return c;\n }\n\n // Using from SO: https://stackoverflow.com/questions/42738640/division-in-ethereum-solidity/42739843#42739843\n // Adapted to use SafeMath and uint256.\n function percent(uint256 numerator, uint256 denominator, uint256 precision) internal constant returns(uint256 quotient) {\n // caution, check safe-to-multiply here\n uint256 _numerator = mul(numerator, 10 ** (precision+1));\n // with rounding of last digit\n uint256 _quotient = (div(_numerator, denominator) + 5) / 10;\n return (_quotient);\n }\n}\n\n", + "sourcePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "ast": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "legacyAST": { + "absolutePath": "/Users/billy/GitHub/okwme/doneth-v2/contracts/Doneth.sol", + "exportedSymbols": { + "Doneth": [ + 1194 + ], + "ERC20": [ + 1261 + ], + "ERC20Basic": [ + 1221 + ], + "Ownable": [ + 48 + ], + "SafeMath": [ + 1393 + ] + }, + "id": 1394, + "nodeType": "SourceUnit", + "nodes": [ + { + "id": 1, + "literals": [ + "solidity", + "^", + "0.4", + ".15" + ], + "nodeType": "PragmaDirective", + "src": "0:24:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title Doneth (Doneth)\n@dev Doneth is a contract that allows shared access to funds\nin the form of Ether and ERC20 tokens. It is especially relevant\nto donation based projects. The admins of the contract determine \nwho is a member, and each member gets a number of shares. The \nnumber of shares each member has determines how much Ether/ERC20 \nthe member can withdraw from the contract.", + "fullyImplemented": true, + "id": 48, + "linearizedBaseContracts": [ + 48 + ], + "name": "Ownable", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 3, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 48, + "src": "640:20:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 2, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "640:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": { + "id": 11, + "nodeType": "Block", + "src": "693:34:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 9, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 6, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "703:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 7, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "711:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 8, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "711:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "703:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 10, + "nodeType": "ExpressionStatement", + "src": "703:17:0" + } + ] + }, + "documentation": null, + "id": 12, + "implemented": true, + "isConstructor": true, + "isDeclaredConst": false, + "modifiers": [], + "name": "Ownable", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "683:2:0" + }, + "payable": false, + "returnParameters": { + "id": 5, + "nodeType": "ParameterList", + "parameters": [], + "src": "693:0:0" + }, + "scope": 48, + "src": "667:60:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 27, + "nodeType": "Block", + "src": "754:78:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 23, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 18, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 15, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "772:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 16, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "772:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 17, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "786:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "772:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 22, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 19, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "795:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 20, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "795:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 21, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "808:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "795:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "772:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 14, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1514, + "src": "764:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 24, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "764:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 25, + "nodeType": "ExpressionStatement", + "src": "764:50:0" + }, + { + "id": 26, + "nodeType": "PlaceholderStatement", + "src": "824:1:0" + } + ] + }, + "documentation": null, + "id": 28, + "name": "onlyOwner", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "751:2:0" + }, + "src": "733:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 46, + "nodeType": "Block", + "src": "900:85:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 39, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 35, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "914:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "30", + "id": 37, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "934:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + } + ], + "id": 36, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 38, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "926:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "914:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 45, + "nodeType": "IfStatement", + "src": "910:69:0", + "trueBody": { + "id": 44, + "nodeType": "Block", + "src": "938:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 42, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 40, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "952:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 41, + "name": "newOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 30, + "src": "960:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "952:16:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 43, + "nodeType": "ExpressionStatement", + "src": "952:16:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 47, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": null, + "id": 33, + "modifierName": { + "argumentTypes": null, + "id": 32, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "883:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "883:9:0" + } + ], + "name": "transferOwnership", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 31, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 30, + "name": "newOwner", + "nodeType": "VariableDeclaration", + "scope": 47, + "src": "865:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 29, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "864:18:0" + }, + "payable": false, + "returnParameters": { + "id": 34, + "nodeType": "ParameterList", + "parameters": [], + "src": "900:0:0" + }, + "scope": 48, + "src": "838:147:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "617:370:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 49, + "name": "Ownable", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 48, + "src": "1008:7:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Ownable_$48", + "typeString": "contract Ownable" + } + }, + "id": 50, + "nodeType": "InheritanceSpecifier", + "src": "1008:7:0" + } + ], + "contractDependencies": [ + 48 + ], + "contractKind": "contract", + "documentation": null, + "fullyImplemented": true, + "id": 1194, + "linearizedBaseContracts": [ + 1194, + 48 + ], + "name": "Doneth", + "nodeType": "ContractDefinition", + "nodes": [ + { + "id": 53, + "libraryName": { + "contractScope": null, + "id": 51, + "name": "SafeMath", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1393, + "src": "1028:8:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_SafeMath_$1393", + "typeString": "library SafeMath" + } + }, + "nodeType": "UsingForDirective", + "src": "1022:27:0", + "typeName": { + "id": 52, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1041:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + { + "constant": false, + "id": 55, + "name": "initialized", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1057:23:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 54, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1057:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 57, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1115:18:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string" + }, + "typeName": { + "id": 56, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1115:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 59, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1186:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 58, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 61, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1265:29:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 60, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1265:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 63, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1354:33:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 62, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1354:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": true, + "id": 66, + "name": "PRECISION", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1454:38:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 64, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1454:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": { + "argumentTypes": null, + "hexValue": "3138", + "id": 65, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "1490:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_18_by_1", + "typeString": "int_const 18" + }, + "value": "18" + }, + "visibility": "public" + }, + { + "constant": false, + "id": 68, + "name": "sharedExpense", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1546:28:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 67, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1546:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 70, + "name": "sharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1580:37:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 69, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1580:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 74, + "name": "members", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1661:41:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "typeName": { + "id": 73, + "keyType": { + "id": 71, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1669:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1661:26:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member)" + }, + "valueType": { + "contractScope": null, + "id": 72, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "1680:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 77, + "name": "memberKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "1708:27:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 75, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1708:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 76, + "length": null, + "nodeType": "ArrayTypeName", + "src": "1708:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Member", + "id": 92, + "members": [ + { + "constant": false, + "id": 79, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1765:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 78, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1765:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 81, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1786:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 80, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "1786:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 83, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1806:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 82, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1806:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 85, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1830:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 84, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1830:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 87, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1857:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + }, + "typeName": { + "id": 86, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "1857:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 91, + "name": "tokensWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 92, + "src": "1884:43:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "typeName": { + "id": 90, + "keyType": { + "id": 88, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "1892:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "1884:27:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + }, + "valueType": { + "id": 89, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "1903:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Member", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "1741:193:0", + "visibility": "public" + }, + { + "constant": false, + "id": 96, + "name": "tokens", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2010:39:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "typeName": { + "id": 95, + "keyType": { + "id": 93, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2018:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Mapping", + "src": "2010:25:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token)" + }, + "valueType": { + "contractScope": null, + "id": 94, + "name": "Token", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 104, + "src": "2029:5:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage_ptr", + "typeString": "struct Doneth.Token" + } + } + }, + "value": null, + "visibility": "public" + }, + { + "constant": false, + "id": 99, + "name": "tokenKeys", + "nodeType": "VariableDeclaration", + "scope": 1194, + "src": "2055:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[]" + }, + "typeName": { + "baseType": { + "id": 97, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "2055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 98, + "length": null, + "nodeType": "ArrayTypeName", + "src": "2055:9:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", + "typeString": "address[]" + } + }, + "value": null, + "visibility": "public" + }, + { + "canonicalName": "Doneth.Token", + "id": 104, + "members": [ + { + "constant": false, + "id": 101, + "name": "exists", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2110:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 100, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "2110:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 103, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 104, + "src": "2131:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 102, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "2131:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "name": "Token", + "nodeType": "StructDefinition", + "scope": 1194, + "src": "2087:73:0", + "visibility": "public" + }, + { + "body": { + "id": 223, + "nodeType": "Block", + "src": "2363:911:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 113, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "2381:12:0", + "subExpression": { + "argumentTypes": null, + "id": 112, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2382:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "hexValue": "414c524541445920494e495449414c495a4544", + "id": 114, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "string", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2395:21:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + }, + "value": "ALREADY INITIALIZED" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_stringliteral_e1b8a905832292be113e59383f7d405b841482915799df05034d0acfef0942b8", + "typeString": "literal_string \"ALREADY INITIALIZED\"" + } + ], + "id": 111, + "name": "require", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1514, + 1515 + ], + "referencedDeclaration": 1515, + "src": "2373:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (bool,string memory) pure" + } + }, + "id": 115, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2373:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 116, + "nodeType": "ExpressionStatement", + "src": "2373:44:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 119, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 117, + "name": "initialized", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 55, + "src": "2427:11:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 118, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2441:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2427:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 120, + "nodeType": "ExpressionStatement", + "src": "2427:18:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 124, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 121, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "2455:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 122, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2463:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 123, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2463:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "2455:17:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 125, + "nodeType": "ExpressionStatement", + "src": "2455:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 129, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 126, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 63, + "src": "2482:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 127, + "name": "block", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1501, + "src": "2503:5:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_block", + "typeString": "block" + } + }, + "id": 128, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "number", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2503:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2482:33:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 130, + "nodeType": "ExpressionStatement", + "src": "2482:33:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 136, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 132, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2535:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 131, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2529:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 133, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2529:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 134, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2529:27:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 135, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2559:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2529:32:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 140, + "nodeType": "IfStatement", + "src": "2525:46:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 137, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2563:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 138, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2563:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 139, + "nodeType": "ExpressionStatement", + "src": "2563:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 146, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 142, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2591:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 141, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "2585:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 143, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2585:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 144, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2585:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 145, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2614:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "2585:31:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 150, + "nodeType": "IfStatement", + "src": "2581:45:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 147, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "2618:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 148, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2618:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 149, + "nodeType": "ExpressionStatement", + "src": "2618:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 153, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 151, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "2636:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 152, + "name": "_contractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 106, + "src": "2643:13:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2636:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 154, + "nodeType": "ExpressionStatement", + "src": "2636:20:0" + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 156, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2721:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 155, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "2721:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 157, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "2721:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 162, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 158, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 160, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "2754:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 161, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2773:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2754:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 163, + "nodeType": "ExpressionStatement", + "src": "2754:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 168, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 164, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2787:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 166, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "2787:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 167, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "2805:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "2787:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 169, + "nodeType": "ExpressionStatement", + "src": "2787:22:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 174, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 170, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2819:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 172, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "2819:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 173, + "name": "_founderName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 108, + "src": "2842:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "2819:35:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 175, + "nodeType": "ExpressionStatement", + "src": "2819:35:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 181, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 176, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "2865:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 179, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 177, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2873:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 178, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2873:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "2865:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 180, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 156, + "src": "2886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "2865:30:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 182, + "nodeType": "ExpressionStatement", + "src": "2865:30:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 186, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "2921:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2921:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 183, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "2905:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 185, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "2905:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 188, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2905:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 189, + "nodeType": "ExpressionStatement", + "src": "2905:26:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 195, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 190, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2981:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 193, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3011:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "id": 191, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "2995:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 192, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "2995:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 194, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "2995:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "2981:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 196, + "nodeType": "ExpressionStatement", + "src": "2981:32:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 210, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 197, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3023:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 200, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 198, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3031:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 199, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3031:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3023:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 201, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3023:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "hexValue": "31", + "id": 208, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3081:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 202, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3051:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 205, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 203, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3059:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 204, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3059:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3051:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 206, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3051:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 207, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "3051:29:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 209, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3051:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "3023:60:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 211, + "nodeType": "ExpressionStatement", + "src": "3023:60:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 213, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3102:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 214, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3102:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "hexValue": "31", + "id": 215, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "3113:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 216, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "3116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 219, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 217, + "name": "tx", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1523, + "src": "3124:2:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_transaction", + "typeString": "tx" + } + }, + "id": 218, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "origin", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "3124:9:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "3116:18:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 220, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "3116:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 212, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "3093:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 221, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "3093:49:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 222, + "nodeType": "ExpressionStatement", + "src": "3093:49:0" + } + ] + }, + "documentation": null, + "id": 224, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "init", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 109, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 106, + "name": "_contractName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2313:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 105, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2313:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 108, + "name": "_founderName", + "nodeType": "VariableDeclaration", + "scope": 224, + "src": "2335:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 107, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "2335:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "2312:43:0" + }, + "payable": false, + "returnParameters": { + "id": 110, + "nodeType": "ParameterList", + "parameters": [], + "src": "2363:0:0" + }, + "scope": 1194, + "src": "2299:975:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 230, + "name": "Deposit", + "nodeType": "EventDefinition", + "parameters": { + "id": 229, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 226, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3294:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 225, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3294:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 228, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 230, + "src": "3308:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 227, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3308:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3293:26:0" + }, + "src": "3280:40:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 238, + "name": "Withdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 237, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 232, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3340:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 231, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3340:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 234, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3354:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 233, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3354:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 236, + "indexed": false, + "name": "newTotalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 238, + "src": "3366:25:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 235, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3366:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3339:53:0" + }, + "src": "3325:68:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 248, + "name": "TokenWithdraw", + "nodeType": "EventDefinition", + "parameters": { + "id": 247, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 240, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3418:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 239, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3418:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 242, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3432:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 241, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3432:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 244, + "indexed": false, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3444:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 243, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3444:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 246, + "indexed": false, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 248, + "src": "3459:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 245, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3459:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3417:54:0" + }, + "src": "3398:74:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 256, + "name": "AddShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 255, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 250, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3492:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 249, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3492:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 252, + "indexed": false, + "name": "addedShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3505:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 251, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3505:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 254, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 256, + "src": "3526:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 253, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3526:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3491:58:0" + }, + "src": "3477:73:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 264, + "name": "RemoveShare", + "nodeType": "EventDefinition", + "parameters": { + "id": 263, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 258, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3573:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 257, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3573:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 260, + "indexed": false, + "name": "removedShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3586:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 259, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3586:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 262, + "indexed": false, + "name": "newTotalShares", + "nodeType": "VariableDeclaration", + "scope": 264, + "src": "3609:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 261, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3609:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3572:60:0" + }, + "src": "3555:78:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 272, + "name": "ChangePrivilege", + "nodeType": "EventDefinition", + "parameters": { + "id": 271, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 266, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3660:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 265, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3660:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 268, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3673:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 267, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3673:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 270, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 272, + "src": "3688:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 269, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "3688:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3659:43:0" + }, + "src": "3638:65:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 278, + "name": "ChangeContractName", + "nodeType": "EventDefinition", + "parameters": { + "id": 277, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 274, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3733:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 273, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3733:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 276, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 278, + "src": "3750:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 275, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3750:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3732:34:0" + }, + "src": "3708:59:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 286, + "name": "ChangeMemberName", + "nodeType": "EventDefinition", + "parameters": { + "id": 285, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 280, + "indexed": false, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3795:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 279, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3795:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 282, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3808:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 281, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3808:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 284, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 286, + "src": "3825:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 283, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "3825:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3794:47:0" + }, + "src": "3772:70:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 294, + "name": "ChangeSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 293, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 288, + "indexed": false, + "name": "contractBalance", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3873:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 287, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3873:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 290, + "indexed": false, + "name": "oldValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3898:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 289, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3898:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 292, + "indexed": false, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 294, + "src": "3916:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 291, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "3916:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3872:61:0" + }, + "src": "3847:87:0" + }, + { + "anonymous": false, + "documentation": null, + "id": 304, + "name": "WithdrawSharedExpense", + "nodeType": "EventDefinition", + "parameters": { + "id": 303, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 296, + "indexed": false, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3967:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 295, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3967:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 298, + "indexed": false, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3981:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 297, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "3981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 300, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "3993:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 299, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "3993:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 302, + "indexed": false, + "name": "newSharedExpenseWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 304, + "src": "4005:33:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 301, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4005:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "3966:73:0" + }, + "src": "3939:101:0" + }, + { + "body": { + "id": 314, + "nodeType": "Block", + "src": "4126:47:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 308, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4144:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 309, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4144:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 310, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4156:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 311, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "value", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4156:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 307, + "name": "Deposit", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 230, + "src": "4136:7:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 312, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4136:30:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 313, + "nodeType": "ExpressionStatement", + "src": "4136:30:0" + } + ] + }, + "documentation": null, + "id": 315, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 305, + "nodeType": "ParameterList", + "parameters": [], + "src": "4108:2:0" + }, + "payable": true, + "returnParameters": { + "id": 306, + "nodeType": "ParameterList", + "parameters": [], + "src": "4126:0:0" + }, + "scope": 1194, + "src": "4099:74:0", + "stateMutability": "payable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 333, + "nodeType": "Block", + "src": "4200:95:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 327, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 320, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 317, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4215:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 318, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4215:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 319, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "4229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "4215:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4238:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 321, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4239:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 324, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 322, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "4247:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 323, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4247:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4239:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 325, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "4239:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "4215:49:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 331, + "nodeType": "IfStatement", + "src": "4211:63:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 328, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4266:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 329, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4266:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 330, + "nodeType": "ExpressionStatement", + "src": "4266:8:0" + } + }, + { + "id": 332, + "nodeType": "PlaceholderStatement", + "src": "4287:1:0" + } + ] + }, + "documentation": null, + "id": 334, + "name": "onlyAdmin", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 316, + "nodeType": "ParameterList", + "parameters": [], + "src": "4197:2:0" + }, + "src": "4179:116:0", + "visibility": "internal" + }, + { + "body": { + "id": 348, + "nodeType": "Block", + "src": "4336:64:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "id": 342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "4351:20:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 338, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "4352:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 340, + "indexExpression": { + "argumentTypes": null, + "id": 339, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 336, + "src": "4360:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4352:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 341, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "4352:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 346, + "nodeType": "IfStatement", + "src": "4347:34:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 343, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "4373:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 344, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4373:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 345, + "nodeType": "ExpressionStatement", + "src": "4373:8:0" + } + }, + { + "id": 347, + "nodeType": "PlaceholderStatement", + "src": "4392:1:0" + } + ] + }, + "documentation": null, + "id": 349, + "name": "onlyExisting", + "nodeType": "ModifierDefinition", + "parameters": { + "id": 337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 336, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 349, + "src": "4323:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 335, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4323:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4322:13:0" + }, + "src": "4301:99:0", + "visibility": "internal" + }, + { + "body": { + "id": 357, + "nodeType": "Block", + "src": "4514:41:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 354, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4531:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 355, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4531:17:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 353, + "id": 356, + "nodeType": "Return", + "src": "4524:24:0" + } + ] + }, + "documentation": null, + "id": 358, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberCount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 350, + "nodeType": "ParameterList", + "parameters": [], + "src": "4481:2:0" + }, + "payable": false, + "returnParameters": { + "id": 353, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 352, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 358, + "src": "4508:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 351, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4508:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4507:6:0" + }, + "scope": 1194, + "src": "4458:97:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 369, + "nodeType": "Block", + "src": "4632:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 365, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "4649:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 367, + "indexExpression": { + "argumentTypes": null, + "id": 366, + "name": "key", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 360, + "src": "4660:3:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "4649:15:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "functionReturnParameters": 364, + "id": 368, + "nodeType": "Return", + "src": "4642:22:0" + } + ] + }, + "documentation": null, + "id": 370, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getMemberAtKey", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 361, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 360, + "name": "key", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4589:8:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 359, + "name": "uint", + "nodeType": "ElementaryTypeName", + "src": "4589:4:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4588:10:0" + }, + "payable": false, + "returnParameters": { + "id": 364, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 363, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 370, + "src": "4623:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 362, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4623:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4622:9:0" + }, + "scope": 1194, + "src": "4565:106:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 378, + "nodeType": "Block", + "src": "4744:36:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 375, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "4761:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 376, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "4761:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 374, + "id": 377, + "nodeType": "Return", + "src": "4754:19:0" + } + ] + }, + "documentation": null, + "id": 379, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getBalance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 371, + "nodeType": "ParameterList", + "parameters": [], + "src": "4700:2:0" + }, + "payable": false, + "returnParameters": { + "id": 374, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 373, + "name": "balance", + "nodeType": "VariableDeclaration", + "scope": 379, + "src": "4727:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 372, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4727:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4726:17:0" + }, + "scope": 1194, + "src": "4681:99:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 401, + "nodeType": "Block", + "src": "4945:94:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 393, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 382, + "src": "4970:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 392, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "4963:6:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_string_storage_ptr_$", + "typeString": "type(string storage pointer)" + }, + "typeName": "string" + }, + "id": 394, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "4963:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + { + "argumentTypes": null, + "id": 395, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 384, + "src": "4977:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 396, + "name": "genesisBlockNumber", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 386, + "src": "4984:18:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 397, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 388, + "src": "5004:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 398, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 390, + "src": "5017:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 399, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "4962:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_string_memory_$_t_address_$_t_uint256_$_t_uint256_$_t_uint256_$", + "typeString": "tuple(string memory,address,uint256,uint256,uint256)" + } + }, + "functionReturnParameters": 391, + "id": 400, + "nodeType": "Return", + "src": "4955:77:0" + } + ] + }, + "documentation": null, + "id": 402, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "getContractInfo", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 380, + "nodeType": "ParameterList", + "parameters": [], + "src": "4814:2:0" + }, + "payable": false, + "returnParameters": { + "id": 391, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 382, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4841:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 381, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "4841:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 384, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4854:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 383, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "4854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 386, + "name": "genesisBlockNumber", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4870:26:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 385, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4870:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 388, + "name": "totalShares", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4899:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 387, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4899:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 390, + "name": "totalWithdrawn", + "nodeType": "VariableDeclaration", + "scope": 402, + "src": "4921:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 389, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "4921:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "4840:104:0" + }, + "scope": 1194, + "src": "4790:249:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 434, + "nodeType": "Block", + "src": "5202:111:0", + "statements": [ + { + "assignments": [ + 419 + ], + "declarations": [ + { + "constant": false, + "id": 419, + "name": "m", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5210:15:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 418, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5210:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 423, + "initialValue": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 420, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5228:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 422, + "indexExpression": { + "argumentTypes": null, + "id": 421, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5236:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5228:17:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "5210:35:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 424, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5261:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 425, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5261:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 426, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5270:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 427, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "5270:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 428, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5280:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 429, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "5280:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 430, + "name": "m", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 419, + "src": "5293:1:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 431, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "5293:12:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + } + ], + "id": 432, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "5260:46:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$_t_bool_$_t_uint256_$_t_uint256_$_t_string_memory_$", + "typeString": "tuple(bool,uint256,uint256,string memory)" + } + }, + "functionReturnParameters": 417, + "id": 433, + "nodeType": "Return", + "src": "5253:53:0" + } + ] + }, + "documentation": null, + "id": 435, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 407, + "name": "_address", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 404, + "src": "5118:8:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 408, + "modifierName": { + "argumentTypes": null, + "id": 406, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "5105:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "5105:22:0" + } + ], + "name": "returnMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 405, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 404, + "name": "_address", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5071:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 403, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5071:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5070:18:0" + }, + "payable": false, + "returnParameters": { + "id": 417, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 410, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5136:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 409, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5136:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 412, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5148:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 411, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5148:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 414, + "name": "withdrawn", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5164:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 413, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5164:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 416, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 435, + "src": "5183:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 415, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5183:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5135:66:0" + }, + "scope": 1194, + "src": "5049:264:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 451, + "nodeType": "Block", + "src": "5394:200:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 447, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "5442:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + ], + "id": 446, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5434:7:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_address_$", + "typeString": "type(address)" + }, + "typeName": "address" + }, + "id": 448, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5434:13:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 443, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 437, + "src": "5417:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 442, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "5411:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 444, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 445, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balanceOf", + "nodeType": "MemberAccess", + "referencedDeclaration": 1203, + "src": "5411:22:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view external returns (uint256)" + } + }, + "id": 449, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5411:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 441, + "id": 450, + "nodeType": "Return", + "src": "5404:44:0" + } + ] + }, + "documentation": null, + "id": 452, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "checkERC20Balance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 438, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 437, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5346:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 436, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5346:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5345:15:0" + }, + "payable": false, + "returnParameters": { + "id": 441, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 440, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 452, + "src": "5385:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 439, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5385:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5384:9:0" + }, + "scope": 1194, + "src": "5319:275:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 521, + "nodeType": "Block", + "src": "5746:399:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 465, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "5817:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 467, + "indexExpression": { + "argumentTypes": null, + "id": 466, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "5825:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "5817:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 468, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5817:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 472, + "nodeType": "IfStatement", + "src": "5813:33:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 469, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5838:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 470, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5838:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 471, + "nodeType": "ExpressionStatement", + "src": "5838:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 478, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 474, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "5866:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 473, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "5860:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 475, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5860:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 476, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "5860:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 477, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5887:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "5860:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 482, + "nodeType": "IfStatement", + "src": "5856:43:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 479, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "5891:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 480, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "5891:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 481, + "nodeType": "ExpressionStatement", + "src": "5891:8:0" + } + }, + { + "assignments": [], + "declarations": [ + { + "constant": false, + "id": 484, + "name": "newMember", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5910:23:0", + "stateVariable": false, + "storageLocation": "memory", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member" + }, + "typeName": { + "contractScope": null, + "id": 483, + "name": "Member", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 92, + "src": "5910:6:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage_ptr", + "typeString": "struct Doneth.Member" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 485, + "initialValue": null, + "nodeType": "VariableDeclarationStatement", + "src": "5910:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 490, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 486, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5943:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 488, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "exists", + "nodeType": "MemberAccess", + "referencedDeclaration": 79, + "src": "5943:16:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "hexValue": "74727565", + "id": 489, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "bool", + "lValueRequested": false, + "nodeType": "Literal", + "src": "5962:4:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "value": "true" + }, + "src": "5943:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 491, + "nodeType": "ExpressionStatement", + "src": "5943:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 496, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 492, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "5976:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 494, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "5976:15:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 495, + "name": "admin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 458, + "src": "5994:5:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "5976:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 497, + "nodeType": "ExpressionStatement", + "src": "5976:23:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 502, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 498, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6009:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "id": 500, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6009:20:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 501, + "name": "memberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 460, + "src": "6032:10:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6009:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory", + "typeString": "string memory" + } + }, + "id": 503, + "nodeType": "ExpressionStatement", + "src": "6009:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 508, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 504, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6053:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 506, + "indexExpression": { + "argumentTypes": null, + "id": 505, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6061:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "6053:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 507, + "name": "newMember", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 484, + "src": "6068:9:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_memory_ptr", + "typeString": "struct Doneth.Member memory" + } + }, + "src": "6053:24:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 509, + "nodeType": "ExpressionStatement", + "src": "6053:24:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 513, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "expression": { + "argumentTypes": null, + "id": 510, + "name": "memberKeys", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 77, + "src": "6087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_array$_t_address_$dyn_storage", + "typeString": "address[] storage ref" + } + }, + "id": 512, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "push", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6087:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) returns (uint256)" + } + }, + "id": 514, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6087:20:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 515, + "nodeType": "ExpressionStatement", + "src": "6087:20:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 517, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 454, + "src": "6126:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 518, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 456, + "src": "6131:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 516, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "6117:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 519, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6117:21:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 520, + "nodeType": "ExpressionStatement", + "src": "6117:21:0" + } + ] + }, + "documentation": null, + "id": 522, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 463, + "modifierName": { + "argumentTypes": null, + "id": 462, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "5734:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "5734:11:0" + } + ], + "name": "addMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 461, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 454, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5667:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 453, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "5667:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 456, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5680:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 455, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "5680:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 458, + "name": "admin", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5696:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 457, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "5696:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 460, + "name": "memberName", + "nodeType": "VariableDeclaration", + "scope": 522, + "src": "5708:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 459, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "5708:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "5666:60:0" + }, + "payable": false, + "returnParameters": { + "id": 464, + "nodeType": "ParameterList", + "parameters": [], + "src": "5746:0:0" + }, + "scope": 1194, + "src": "5648:497:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 575, + "nodeType": "Block", + "src": "6248:244:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + }, + "id": 544, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 536, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 538, + "indexExpression": { + "argumentTypes": null, + "id": 537, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6275:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6267:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 539, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6267:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + ], + "id": 535, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6262:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 540, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6262:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 542, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6300:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 541, + "name": "sha3", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1521, + "src": "6295:4:0", + "typeDescriptions": { + "typeIdentifier": "t_function_sha3_pure$__$returns$_t_bytes32_$", + "typeString": "function () pure returns (bytes32)" + } + }, + "id": 543, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6295:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes32", + "typeString": "bytes32" + } + }, + "src": "6262:43:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 550, + "nodeType": "IfStatement", + "src": "6258:76:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 546, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6324:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 547, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 530, + "src": "6329:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 545, + "name": "changeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 633, + "src": "6307:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory)" + } + }, + "id": 548, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6307:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 549, + "nodeType": "ExpressionStatement", + "src": "6307:27:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 556, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 551, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6348:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 553, + "indexExpression": { + "argumentTypes": null, + "id": 552, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6356:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6348:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 554, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6348:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 555, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6370:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6348:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 562, + "nodeType": "IfStatement", + "src": "6344:69:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 558, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6400:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 559, + "name": "isAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 528, + "src": "6405:7:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 557, + "name": "changeAdminPrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 659, + "src": "6379:20:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_bool_$returns$__$", + "typeString": "function (address,bool)" + } + }, + "id": 560, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6379:34:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 561, + "nodeType": "ExpressionStatement", + "src": "6379:34:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 568, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 563, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6427:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 565, + "indexExpression": { + "argumentTypes": null, + "id": 564, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6435:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6427:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 566, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "6427:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 567, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6450:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "6427:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 574, + "nodeType": "IfStatement", + "src": "6423:62:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 570, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 524, + "src": "6473:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 571, + "name": "shares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 526, + "src": "6478:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 569, + "name": "allocateShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 772, + "src": "6458:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 572, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6458:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 573, + "nodeType": "ExpressionStatement", + "src": "6458:27:0" + } + } + ] + }, + "documentation": null, + "id": 576, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 533, + "modifierName": { + "argumentTypes": null, + "id": 532, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6236:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6236:11:0" + } + ], + "name": "updateMember", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 531, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 524, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6173:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 523, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6173:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 526, + "name": "shares", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6186:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 525, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "6186:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 528, + "name": "isAdmin", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6202:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 527, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6202:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 530, + "name": "name", + "nodeType": "VariableDeclaration", + "scope": 576, + "src": "6216:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 529, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6216:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6172:56:0" + }, + "payable": false, + "returnParameters": { + "id": 534, + "nodeType": "ParameterList", + "parameters": [], + "src": "6248:0:0" + }, + "scope": 1194, + "src": "6151:341:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 632, + "nodeType": "Block", + "src": "6638:259:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 601, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 594, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 589, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 586, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6652:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 587, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6652:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 588, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6666:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6652:17:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "id": 593, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 590, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6673:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 591, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6673:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "nodeType": "BinaryOperation", + "operator": "!=", + "rightExpression": { + "argumentTypes": null, + "id": 592, + "name": "owner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 3, + "src": "6687:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "src": "6673:19:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:40:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "&&", + "rightExpression": { + "argumentTypes": null, + "id": 600, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "UnaryOperation", + "operator": "!", + "prefix": true, + "src": "6696:26:0", + "subExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 595, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6697:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 598, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 596, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "6705:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 597, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6705:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6697:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 599, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "6697:25:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "6652:70:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 605, + "nodeType": "IfStatement", + "src": "6648:84:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 602, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6724:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 603, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6724:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 604, + "nodeType": "ExpressionStatement", + "src": "6724:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 611, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 607, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6752:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 606, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "6746:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 608, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6746:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 609, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "6746:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 610, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "6770:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "6746:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 615, + "nodeType": "IfStatement", + "src": "6742:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 612, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "6774:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 613, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6774:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 614, + "nodeType": "ExpressionStatement", + "src": "6774:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 617, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6809:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 618, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6814:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 620, + "indexExpression": { + "argumentTypes": null, + "id": 619, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6822:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6814:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 621, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6814:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 622, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6839:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 616, + "name": "ChangeMemberName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 286, + "src": "6792:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (address,string memory,string memory)" + } + }, + "id": 623, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6792:55:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 624, + "nodeType": "ExpressionStatement", + "src": "6792:55:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 630, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 625, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "6857:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 627, + "indexExpression": { + "argumentTypes": null, + "id": 626, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6865:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "6857:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 628, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "memberName", + "nodeType": "MemberAccess", + "referencedDeclaration": 87, + "src": "6857:23:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 629, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 580, + "src": "6883:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "6857:33:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 631, + "nodeType": "ExpressionStatement", + "src": "6857:33:0" + } + ] + }, + "documentation": null, + "id": 633, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 583, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 578, + "src": "6633:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 584, + "modifierName": { + "argumentTypes": null, + "id": 582, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "6620:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "6620:17:0" + } + ], + "name": "changeMemberName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 581, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 578, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6584:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 577, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6584:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 580, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 633, + "src": "6597:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 579, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "6597:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6583:29:0" + }, + "payable": false, + "returnParameters": { + "id": 585, + "nodeType": "ParameterList", + "parameters": [], + "src": "6638:0:0" + }, + "scope": 1194, + "src": "6558:339:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 658, + "nodeType": "Block", + "src": "6980:107:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 643, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7006:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 644, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7011:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 646, + "indexExpression": { + "argumentTypes": null, + "id": 645, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7019:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7011:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 647, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7011:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + { + "argumentTypes": null, + "id": 648, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7031:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 642, + "name": "ChangePrivilege", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 272, + "src": "6990:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_bool_$_t_bool_$returns$__$", + "typeString": "function (address,bool,bool)" + } + }, + "id": 649, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "6990:50:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 650, + "nodeType": "ExpressionStatement", + "src": "6990:50:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 656, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 651, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "7050:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 653, + "indexExpression": { + "argumentTypes": null, + "id": 652, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 635, + "src": "7058:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "7050:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 654, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "admin", + "nodeType": "MemberAccess", + "referencedDeclaration": 81, + "src": "7050:18:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 655, + "name": "newValue", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 637, + "src": "7071:8:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "7050:29:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 657, + "nodeType": "ExpressionStatement", + "src": "7050:29:0" + } + ] + }, + "documentation": null, + "id": 659, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 640, + "modifierName": { + "argumentTypes": null, + "id": 639, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "6968:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "6968:11:0" + } + ], + "name": "changeAdminPrivilege", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 638, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 635, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6933:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 634, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "6933:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 637, + "name": "newValue", + "nodeType": "VariableDeclaration", + "scope": 659, + "src": "6946:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 636, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "6946:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "6932:28:0" + }, + "payable": false, + "returnParameters": { + "id": 641, + "nodeType": "ParameterList", + "parameters": [], + "src": "6980:0:0" + }, + "scope": 1194, + "src": "6903:184:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 685, + "nodeType": "Block", + "src": "7215:124:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 671, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 667, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7235:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 666, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "nodeType": "ElementaryTypeNameExpression", + "src": "7229:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_bytes_storage_ptr_$", + "typeString": "type(bytes storage pointer)" + }, + "typeName": "bytes" + }, + "id": 668, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7229:14:0", + "typeDescriptions": { + "typeIdentifier": "t_bytes_memory", + "typeString": "bytes memory" + } + }, + "id": 669, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "length", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7229:21:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3231", + "id": 670, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "7253:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_21_by_1", + "typeString": "int_const 21" + }, + "value": "21" + }, + "src": "7229:26:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 675, + "nodeType": "IfStatement", + "src": "7225:40:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 672, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7257:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 673, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7257:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 674, + "nodeType": "ExpressionStatement", + "src": "7257:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 677, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7294:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + { + "argumentTypes": null, + "id": 678, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7300:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + }, + { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + ], + "id": 676, + "name": "ChangeContractName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 278, + "src": "7275:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_string_memory_ptr_$_t_string_memory_ptr_$returns$__$", + "typeString": "function (string memory,string memory)" + } + }, + "id": 679, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7275:33:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 680, + "nodeType": "ExpressionStatement", + "src": "7275:33:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 683, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 681, + "name": "name", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 57, + "src": "7318:4:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 682, + "name": "newName", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 661, + "src": "7325:7:0", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string memory" + } + }, + "src": "7318:14:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage", + "typeString": "string storage ref" + } + }, + "id": 684, + "nodeType": "ExpressionStatement", + "src": "7318:14:0" + } + ] + }, + "documentation": null, + "id": 686, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 664, + "modifierName": { + "argumentTypes": null, + "id": 663, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "7203:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7203:11:0" + } + ], + "name": "changeContractName", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 662, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 661, + "name": "newName", + "nodeType": "VariableDeclaration", + "scope": 686, + "src": "7180:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_string_memory_ptr", + "typeString": "string" + }, + "typeName": { + "id": 660, + "name": "string", + "nodeType": "ElementaryTypeName", + "src": "7180:6:0", + "typeDescriptions": { + "typeIdentifier": "t_string_storage_ptr", + "typeString": "string" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7179:16:0" + }, + "payable": false, + "returnParameters": { + "id": 665, + "nodeType": "ParameterList", + "parameters": [], + "src": "7215:0:0" + }, + "scope": 1194, + "src": "7152:187:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 722, + "nodeType": "Block", + "src": "7653:262:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 695, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 693, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7667:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<", + "rightExpression": { + "argumentTypes": null, + "id": 694, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7683:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7667:38:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 699, + "nodeType": "IfStatement", + "src": "7663:52:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 696, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7707:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 697, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7707:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 698, + "nodeType": "ExpressionStatement", + "src": "7707:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 706, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 702, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "7747:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 700, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7729:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 701, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "7729:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 703, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7729:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 704, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7773:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 705, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7773:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7729:56:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 710, + "nodeType": "IfStatement", + "src": "7725:70:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 707, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "7787:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 708, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7787:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 709, + "nodeType": "ExpressionStatement", + "src": "7787:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 712, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "7826:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 713, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "7826:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 714, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7840:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 715, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7855:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 711, + "name": "ChangeSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 294, + "src": "7806:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_uint256_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (uint256,uint256,uint256)" + } + }, + "id": 716, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "7806:63:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 717, + "nodeType": "ExpressionStatement", + "src": "7806:63:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 720, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 718, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "7879:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "id": 719, + "name": "newAllocation", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 688, + "src": "7895:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "7879:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 721, + "nodeType": "ExpressionStatement", + "src": "7879:29:0" + } + ] + }, + "documentation": null, + "id": 723, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 691, + "modifierName": { + "argumentTypes": null, + "id": 690, + "name": "onlyOwner", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 28, + "src": "7641:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "7641:11:0" + } + ], + "name": "changeSharedExpenseAllocation", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 689, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 688, + "name": "newAllocation", + "nodeType": "VariableDeclaration", + "scope": 723, + "src": "7611:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 687, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "7611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "7610:23:0" + }, + "payable": false, + "returnParameters": { + "id": 692, + "nodeType": "ParameterList", + "parameters": [], + "src": "7653:0:0" + }, + "scope": 1194, + "src": "7572:343:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 771, + "nodeType": "Block", + "src": "8108:283:0", + "statements": [ + { + "assignments": [ + 736 + ], + "declarations": [ + { + "constant": false, + "id": 736, + "name": "currentShares", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8118:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 735, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8118:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 741, + "initialValue": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 737, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8142:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 739, + "indexExpression": { + "argumentTypes": null, + "id": 738, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8150:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8142:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 740, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8142:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "8118:43:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 744, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 742, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8175:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 743, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8185:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8175:23:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 748, + "nodeType": "IfStatement", + "src": "8171:37:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 745, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "8200:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 746, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8200:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 747, + "nodeType": "ExpressionStatement", + "src": "8200:8:0" + } + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 751, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 749, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8222:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "id": 750, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8231:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8222:22:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": { + "id": 769, + "nodeType": "Block", + "src": "8317:68:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 762, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8343:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 765, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8366:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 763, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8348:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 764, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8348:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 766, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8348:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 761, + "name": "removeShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 856, + "src": "8331:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 767, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8331:43:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 768, + "nodeType": "ExpressionStatement", + "src": "8331:43:0" + } + ] + }, + "id": 770, + "nodeType": "IfStatement", + "src": "8218:167:0", + "trueBody": { + "id": 760, + "nodeType": "Block", + "src": "8246:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 753, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8269:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 756, + "name": "currentShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 736, + "src": "8285:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 754, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 727, + "src": "8274:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 755, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8274:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 757, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8274:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 752, + "name": "addShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 814, + "src": "8260:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256)" + } + }, + "id": 758, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8260:40:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 759, + "nodeType": "ExpressionStatement", + "src": "8260:40:0" + } + ] + } + } + ] + }, + "documentation": null, + "id": 772, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 730, + "modifierName": { + "argumentTypes": null, + "id": 729, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8078:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8078:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 732, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 725, + "src": "8103:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 733, + "modifierName": { + "argumentTypes": null, + "id": 731, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8090:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8090:17:0" + } + ], + "name": "allocateShares", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 728, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 725, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8042:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 724, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8042:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 727, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 772, + "src": "8055:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 726, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8055:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8041:29:0" + }, + "payable": false, + "returnParameters": { + "id": 734, + "nodeType": "ParameterList", + "parameters": [], + "src": "8108:0:0" + }, + "scope": 1194, + "src": "8018:373:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 813, + "nodeType": "Block", + "src": "8532:169:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 789, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 784, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8542:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 787, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8572:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 785, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8556:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 786, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8556:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 788, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8556:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8542:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 790, + "nodeType": "ExpressionStatement", + "src": "8542:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 802, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 791, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8589:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 793, + "indexExpression": { + "argumentTypes": null, + "id": 792, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8597:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8589:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 794, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8589:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 800, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8635:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 795, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8611:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 797, + "indexExpression": { + "argumentTypes": null, + "id": 796, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8619:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8611:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 798, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8611:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 799, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "8611:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 801, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8611:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8589:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 803, + "nodeType": "ExpressionStatement", + "src": "8589:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 805, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8661:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 806, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 776, + "src": "8666:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 807, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8674:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 809, + "indexExpression": { + "argumentTypes": null, + "id": 808, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8682:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8674:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 810, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8674:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 804, + "name": "AddShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 256, + "src": "8652:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 811, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8652:42:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 812, + "nodeType": "ExpressionStatement", + "src": "8652:42:0" + } + ] + }, + "documentation": null, + "id": 814, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 779, + "modifierName": { + "argumentTypes": null, + "id": 778, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8502:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8502:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 781, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 774, + "src": "8527:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 782, + "modifierName": { + "argumentTypes": null, + "id": 780, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8514:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8514:17:0" + } + ], + "name": "addShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 777, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 774, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8466:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 773, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8466:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 776, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 814, + "src": "8479:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 775, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8479:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8465:29:0" + }, + "payable": false, + "returnParameters": { + "id": 783, + "nodeType": "ParameterList", + "parameters": [], + "src": "8532:0:0" + }, + "scope": 1194, + "src": "8448:253:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 855, + "nodeType": "Block", + "src": "8845:172:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "id": 831, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 826, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8855:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 829, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8885:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 827, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "8869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 828, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8869:15:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 830, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8869:23:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8855:37:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 832, + "nodeType": "ExpressionStatement", + "src": "8855:37:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 844, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 833, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8902:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 835, + "indexExpression": { + "argumentTypes": null, + "id": 834, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8910:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8902:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 836, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8902:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 842, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8948:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 837, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8924:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 839, + "indexExpression": { + "argumentTypes": null, + "id": 838, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8932:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8924:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 840, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8924:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 841, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "8924:23:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 843, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8924:31:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "8902:53:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 845, + "nodeType": "ExpressionStatement", + "src": "8902:53:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 847, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8977:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 848, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 818, + "src": "8982:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 849, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "8990:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 851, + "indexExpression": { + "argumentTypes": null, + "id": 850, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8998:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "8990:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 852, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "8990:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 846, + "name": "RemoveShare", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 264, + "src": "8965:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 853, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "8965:45:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 854, + "nodeType": "ExpressionStatement", + "src": "8965:45:0" + } + ] + }, + "documentation": null, + "id": 856, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 821, + "modifierName": { + "argumentTypes": null, + "id": 820, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "8815:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "8815:11:0" + }, + { + "arguments": [ + { + "argumentTypes": null, + "id": 823, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 816, + "src": "8840:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 824, + "modifierName": { + "argumentTypes": null, + "id": 822, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "8827:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "8827:17:0" + } + ], + "name": "removeShare", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 819, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 816, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8779:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 815, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "8779:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 818, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 856, + "src": "8792:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 817, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "8792:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "8778:29:0" + }, + "payable": false, + "returnParameters": { + "id": 825, + "nodeType": "ParameterList", + "parameters": [], + "src": "8845:0:0" + }, + "scope": 1194, + "src": "8758:259:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 923, + "nodeType": "Block", + "src": "9430:392:0", + "statements": [ + { + "assignments": [ + 866 + ], + "declarations": [ + { + "constant": false, + "id": 866, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9440:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 865, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9440:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 871, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 868, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9492:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 869, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9492:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 867, + "name": "calculateTotalWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1113, + "src": "9459:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 870, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9459:44:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9440:63:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 881, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 872, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9517:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 875, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9539:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 878, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 876, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9547:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 877, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9547:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9539:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 879, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9539:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 873, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 866, + "src": "9526:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 874, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "9526:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 880, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9526:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9517:52:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 885, + "nodeType": "IfStatement", + "src": "9513:66:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 882, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "9571:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 883, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9571:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 884, + "nodeType": "ExpressionStatement", + "src": "9571:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 899, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 886, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9598:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 889, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 887, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9606:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 888, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9606:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9598:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 890, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9598:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 897, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9664:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 891, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "9630:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 894, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 892, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9638:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 893, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9638:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "9630:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 895, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "withdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 85, + "src": "9630:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 896, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9630:33:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 898, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9630:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9598:73:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 900, + "nodeType": "ExpressionStatement", + "src": "9598:73:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 906, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 901, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9681:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 904, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9717:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 902, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9698:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 903, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "9698:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 905, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9698:26:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "9681:43:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 907, + "nodeType": "ExpressionStatement", + "src": "9681:43:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 913, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9754:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 908, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9734:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 911, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 912, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9734:19:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 914, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9734:27:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 915, + "nodeType": "ExpressionStatement", + "src": "9734:27:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 917, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9780:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 918, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9780:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 919, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 858, + "src": "9792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 920, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "9800:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 916, + "name": "Withdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 238, + "src": "9771:8:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,uint256)" + } + }, + "id": 921, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9771:44:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 922, + "nodeType": "ExpressionStatement", + "src": "9771:44:0" + } + ] + }, + "documentation": null, + "id": 924, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 861, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9418:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 862, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9418:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 863, + "modifierName": { + "argumentTypes": null, + "id": 860, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9405:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9405:24:0" + } + ], + "name": "withdraw", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 859, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 858, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 924, + "src": "9382:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 857, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9382:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9381:16:0" + }, + "payable": false, + "returnParameters": { + "id": 864, + "nodeType": "ParameterList", + "parameters": [], + "src": "9430:0:0" + }, + "scope": 1194, + "src": "9364:458:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1011, + "nodeType": "Block", + "src": "9958:503:0", + "statements": [ + { + "assignments": [ + 936 + ], + "declarations": [ + { + "constant": false, + "id": 936, + "name": "newTotal", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9968:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 935, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9968:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 942, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 938, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10025:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 939, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10025:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 940, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10037:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 937, + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1164, + "src": "9987:37:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$_t_address_$returns$_t_uint256_$", + "typeString": "function (address,address) view returns (uint256)" + } + }, + "id": 941, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "9987:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "9968:75:0" + }, + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 954, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 943, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10057:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 946, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10079:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 949, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 947, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10087:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 948, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10087:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 950, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10079:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 952, + "indexExpression": { + "argumentTypes": null, + "id": 951, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10115:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10079:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 944, + "name": "newTotal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 936, + "src": "10066:8:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 945, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "10066:12:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 953, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10066:56:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10057:65:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 958, + "nodeType": "IfStatement", + "src": "10053:79:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 955, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10124:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 956, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10124:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 957, + "nodeType": "ExpressionStatement", + "src": "10124:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 976, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 959, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10143:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 962, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 960, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10151:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 961, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10151:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10143:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 963, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10143:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 965, + "indexExpression": { + "argumentTypes": null, + "id": 964, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10179:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "nodeType": "IndexAccess", + "src": "10143:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 974, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10235:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 966, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "10188:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 969, + "indexExpression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 967, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10196:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 968, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10196:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:19:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 970, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "tokensWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 91, + "src": "10188:35:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", + "typeString": "mapping(address => uint256)" + } + }, + "id": 972, + "indexExpression": { + "argumentTypes": null, + "id": 971, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10224:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10188:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 973, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10188:46:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 975, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10188:54:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10143:99:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 977, + "nodeType": "ExpressionStatement", + "src": "10143:99:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 989, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 978, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10252:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 980, + "indexExpression": { + "argumentTypes": null, + "id": 979, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10259:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10252:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 981, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": true, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10252:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 987, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10316:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 982, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10283:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 984, + "indexExpression": { + "argumentTypes": null, + "id": 983, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10290:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10283:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 985, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10283:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 986, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10283:32:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 988, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10283:40:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10252:71:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 990, + "nodeType": "ExpressionStatement", + "src": "10252:71:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 995, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10355:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 996, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10355:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 997, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10367:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 992, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10339:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 991, + "name": "ERC20", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1261, + "src": "10333:5:0", + "typeDescriptions": { + "typeIdentifier": "t_type$_t_contract$_ERC20_$1261_$", + "typeString": "type(contract ERC20)" + } + }, + "id": 993, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "typeConversion", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:12:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20_$1261", + "typeString": "contract ERC20" + } + }, + "id": 994, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": 1212, + "src": "10333:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_uint256_$returns$_t_bool_$", + "typeString": "function (address,uint256) external returns (bool)" + } + }, + "id": 998, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10333:41:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "id": 999, + "nodeType": "ExpressionStatement", + "src": "10333:41:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1001, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10398:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1002, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10398:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1003, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 926, + "src": "10410:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1004, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10418:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1005, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "10425:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1007, + "indexExpression": { + "argumentTypes": null, + "id": 1006, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 928, + "src": "10432:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "10425:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1008, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "10425:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1000, + "name": "TokenWithdraw", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 248, + "src": "10384:13:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_uint256_$_t_address_$_t_uint256_$returns$__$", + "typeString": "function (address,uint256,address,uint256)" + } + }, + "id": 1009, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10384:70:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1010, + "nodeType": "ExpressionStatement", + "src": "10384:70:0" + } + ] + }, + "documentation": null, + "id": 1012, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 931, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "9946:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 932, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "9946:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 933, + "modifierName": { + "argumentTypes": null, + "id": 930, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "9933:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "9933:24:0" + } + ], + "name": "withdrawToken", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 929, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 926, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9895:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 925, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "9895:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 928, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1012, + "src": "9911:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 927, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "9911:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "9894:31:0" + }, + "payable": false, + "returnParameters": { + "id": 934, + "nodeType": "ParameterList", + "parameters": [], + "src": "9958:0:0" + }, + "scope": 1194, + "src": "9872:589:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1050, + "nodeType": "Block", + "src": "10726:267:0", + "statements": [ + { + "condition": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1024, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1021, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10740:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">", + "rightExpression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1022, + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1175, + "src": "10749:39:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$__$returns$_t_uint256_$", + "typeString": "function () view returns (uint256)" + } + }, + "id": 1023, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10749:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10740:50:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "falseBody": null, + "id": 1028, + "nodeType": "IfStatement", + "src": "10736:64:0", + "trueBody": { + "expression": { + "argumentTypes": null, + "arguments": [], + "expression": { + "argumentTypes": [], + "id": 1025, + "name": "revert", + "nodeType": "Identifier", + "overloadedDeclarations": [ + 1516, + 1517 + ], + "referencedDeclaration": 1516, + "src": "10792:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_revert_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 1026, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10792:8:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1027, + "nodeType": "ExpressionStatement", + "src": "10792:8:0" + } + }, + { + "expression": { + "argumentTypes": null, + "id": 1034, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1029, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10819:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1032, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1030, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10844:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1031, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "10844:26:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1033, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10844:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "10819:59:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1035, + "nodeType": "ExpressionStatement", + "src": "10819:59:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1039, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10900:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1036, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10888:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "id": 1038, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "transfer", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10888:11:0", + "typeDescriptions": { + "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", + "typeString": "function (uint256)" + } + }, + "id": 1040, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10888:19:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1041, + "nodeType": "ExpressionStatement", + "src": "10888:19:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1043, + "name": "msg", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1511, + "src": "10939:3:0", + "typeDescriptions": { + "typeIdentifier": "t_magic_message", + "typeString": "msg" + } + }, + "id": 1044, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sender", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "10939:10:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1045, + "name": "to", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1016, + "src": "10951:2:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + { + "argumentTypes": null, + "id": 1046, + "name": "amount", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1014, + "src": "10955:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1047, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "10963:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_address", + "typeString": "address" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1042, + "name": "WithdrawSharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 304, + "src": "10917:21:0", + "typeDescriptions": { + "typeIdentifier": "t_function_event_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_uint256_$returns$__$", + "typeString": "function (address,address,uint256,uint256)" + } + }, + "id": 1048, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "10917:69:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1049, + "nodeType": "ExpressionStatement", + "src": "10917:69:0" + } + ] + }, + "documentation": null, + "id": 1051, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [ + { + "arguments": [], + "id": 1019, + "modifierName": { + "argumentTypes": null, + "id": 1018, + "name": "onlyAdmin", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 334, + "src": "10714:9:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$__$", + "typeString": "modifier ()" + } + }, + "nodeType": "ModifierInvocation", + "src": "10714:11:0" + } + ], + "name": "withdrawSharedExpense", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1017, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1014, + "name": "amount", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10679:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1013, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "10679:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1016, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1051, + "src": "10695:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1015, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "10695:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "10678:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1020, + "nodeType": "ParameterList", + "parameters": [], + "src": "10726:0:0" + }, + "scope": 1194, + "src": "10648:345:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1112, + "nodeType": "Block", + "src": "11276:651:0", + "statements": [ + { + "assignments": [ + 1062 + ], + "declarations": [ + { + "constant": false, + "id": 1062, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11424:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1061, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1068, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1066, + "name": "totalWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 61, + "src": "11462:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "id": 1063, + "name": "this", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1526, + "src": "11445:4:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_Doneth_$1194", + "typeString": "contract Doneth" + } + }, + "id": 1064, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "balance", + "nodeType": "MemberAccess", + "referencedDeclaration": null, + "src": "11445:12:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1065, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11445:16:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1067, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11445:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11424:53:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1074, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1069, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11487:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1072, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "11515:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1070, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11500:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1071, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "11500:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1073, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11500:29:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11487:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1075, + "nodeType": "ExpressionStatement", + "src": "11487:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1081, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftHandSide": { + "argumentTypes": null, + "id": 1076, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11539:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "Assignment", + "operator": "=", + "rightHandSide": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1079, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "11567:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1077, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11552:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1078, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "11552:14:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1080, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11552:38:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11539:51:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1082, + "nodeType": "ExpressionStatement", + "src": "11539:51:0" + }, + { + "assignments": [ + 1084 + ], + "declarations": [ + { + "constant": false, + "id": 1084, + "name": "ethPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11710:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1083, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11710:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1090, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1087, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "11754:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1088, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11767:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1085, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1062, + "src": "11735:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1086, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "11735:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1089, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11735:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11710:67:0" + }, + { + "assignments": [ + 1092 + ], + "declarations": [ + { + "constant": false, + "id": 1092, + "name": "ethPPN", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11788:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1091, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11788:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1100, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1095, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "11824:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1097, + "indexExpression": { + "argumentTypes": null, + "id": 1096, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11832:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "11824:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1098, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "11824:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1093, + "name": "ethPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1084, + "src": "11805:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1094, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "11805:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1099, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11805:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11788:56:0" + }, + { + "assignments": [ + 1102 + ], + "declarations": [ + { + "constant": false, + "id": 1102, + "name": "ethVal", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11854:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1101, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11854:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1109, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1107, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1105, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "11882:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1106, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "11886:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "11882:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1103, + "name": "ethPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1092, + "src": "11871:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1104, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "11871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1108, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "11871:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "11854:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1110, + "name": "ethVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1102, + "src": "11914:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1060, + "id": 1111, + "nodeType": "Return", + "src": "11907:13:0" + } + ] + }, + "documentation": null, + "id": 1113, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [ + { + "arguments": [ + { + "argumentTypes": null, + "id": 1056, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1053, + "src": "11253:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "id": 1057, + "modifierName": { + "argumentTypes": null, + "id": 1055, + "name": "onlyExisting", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 349, + "src": "11240:12:0", + "typeDescriptions": { + "typeIdentifier": "t_modifier$_t_address_$", + "typeString": "modifier (address)" + } + }, + "nodeType": "ModifierInvocation", + "src": "11240:17:0" + } + ], + "name": "calculateTotalWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1054, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1053, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11211:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1052, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11211:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11210:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1060, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1059, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1113, + "src": "11267:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1058, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "11267:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11266:9:0" + }, + "scope": 1194, + "src": "11169:758:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1163, + "nodeType": "Block", + "src": "12042:418:0", + "statements": [ + { + "assignments": [ + 1123 + ], + "declarations": [ + { + "constant": false, + "id": 1123, + "name": "balanceSum", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12052:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1122, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12052:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1133, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1128, + "name": "tokens", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 96, + "src": "12102:6:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Token_$104_storage_$", + "typeString": "mapping(address => struct Doneth.Token storage ref)" + } + }, + "id": 1130, + "indexExpression": { + "argumentTypes": null, + "id": 1129, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12109:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12102:13:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Token_$104_storage", + "typeString": "struct Doneth.Token storage ref" + } + }, + "id": 1131, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "totalWithdrawn", + "nodeType": "MemberAccess", + "referencedDeclaration": 103, + "src": "12102:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1125, + "name": "token", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1117, + "src": "12091:5:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_address", + "typeString": "address" + } + ], + "id": 1124, + "name": "checkERC20Balance", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 452, + "src": "12073:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_address_$returns$_t_uint256_$", + "typeString": "function (address) view returns (uint256)" + } + }, + "id": 1126, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:24:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1127, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "add", + "nodeType": "MemberAccess", + "referencedDeclaration": 1353, + "src": "12073:28:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1132, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12073:58:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12052:79:0" + }, + { + "assignments": [ + 1135 + ], + "declarations": [ + { + "constant": false, + "id": 1135, + "name": "tokPerSharePPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12243:22:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1134, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12243:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1141, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1138, + "name": "totalShares", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 59, + "src": "12287:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1139, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12300:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1136, + "name": "balanceSum", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1123, + "src": "12268:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1137, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12268:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1140, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12268:42:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12243:67:0" + }, + { + "assignments": [ + 1143 + ], + "declarations": [ + { + "constant": false, + "id": 1143, + "name": "tokPPN", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12321:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1142, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12321:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1151, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "expression": { + "argumentTypes": null, + "baseExpression": { + "argumentTypes": null, + "id": 1146, + "name": "members", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 74, + "src": "12357:7:0", + "typeDescriptions": { + "typeIdentifier": "t_mapping$_t_address_$_t_struct$_Member_$92_storage_$", + "typeString": "mapping(address => struct Doneth.Member storage ref)" + } + }, + "id": 1148, + "indexExpression": { + "argumentTypes": null, + "id": 1147, + "name": "who", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1115, + "src": "12365:3:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "nodeType": "IndexAccess", + "src": "12357:12:0", + "typeDescriptions": { + "typeIdentifier": "t_struct$_Member_$92_storage", + "typeString": "struct Doneth.Member storage ref" + } + }, + "id": 1149, + "isConstant": false, + "isLValue": true, + "isPure": false, + "lValueRequested": false, + "memberName": "shares", + "nodeType": "MemberAccess", + "referencedDeclaration": 83, + "src": "12357:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1144, + "name": "tokPerSharePPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1135, + "src": "12338:14:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1145, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "mul", + "nodeType": "MemberAccess", + "referencedDeclaration": 1291, + "src": "12338:18:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1150, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12338:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12321:56:0" + }, + { + "assignments": [ + 1153 + ], + "declarations": [ + { + "constant": false, + "id": 1153, + "name": "tokVal", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12387:14:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1152, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12387:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1160, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1158, + "isConstant": false, + "isLValue": false, + "isPure": true, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1156, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "12415:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "id": 1157, + "name": "PRECISION", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 66, + "src": "12419:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "12415:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1154, + "name": "tokPPN", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1143, + "src": "12404:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1155, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "div", + "nodeType": "MemberAccess", + "referencedDeclaration": 1309, + "src": "12404:10:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1159, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12404:25:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "12387:42:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1161, + "name": "tokVal", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1153, + "src": "12447:6:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1121, + "id": 1162, + "nodeType": "Return", + "src": "12440:13:0" + } + ] + }, + "documentation": null, + "id": 1164, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalWithdrawableTokenAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1118, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1115, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1114, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1117, + "name": "token", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "11994:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1116, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "11994:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "11980:28:0" + }, + "payable": false, + "returnParameters": { + "id": 1121, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1120, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1164, + "src": "12033:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1119, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12033:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12032:9:0" + }, + "scope": 1194, + "src": "11934:526:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1174, + "nodeType": "Block", + "src": "12550:65:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1171, + "name": "sharedExpenseWithdrawn", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 70, + "src": "12585:22:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1169, + "name": "sharedExpense", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 68, + "src": "12567:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1170, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "sub", + "nodeType": "MemberAccess", + "referencedDeclaration": 1329, + "src": "12567:17:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1172, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12567:41:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1168, + "id": 1173, + "nodeType": "Return", + "src": "12560:48:0" + } + ] + }, + "documentation": null, + "id": 1175, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "calculateTotalExpenseWithdrawableAmount", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1165, + "nodeType": "ParameterList", + "parameters": [], + "src": "12514:2:0" + }, + "payable": false, + "returnParameters": { + "id": 1168, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1167, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1175, + "src": "12541:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1166, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12541:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12540:9:0" + }, + "scope": 1194, + "src": "12466:149:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": { + "id": 1192, + "nodeType": "Block", + "src": "12737:39:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1188, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1179, + "src": "12764:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1189, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1181, + "src": "12767:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "expression": { + "argumentTypes": null, + "id": 1186, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1177, + "src": "12754:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "id": 1187, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "memberName": "percent", + "nodeType": "MemberAccess", + "referencedDeclaration": 1392, + "src": "12754:9:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", + "typeString": "function (uint256,uint256,uint256) view returns (uint256)" + } + }, + "id": 1190, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "12754:15:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1185, + "id": 1191, + "nodeType": "Return", + "src": "12747:22:0" + } + ] + }, + "documentation": null, + "id": 1193, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "delegatePercent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1182, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1177, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12670:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1176, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12670:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1179, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12681:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1178, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12681:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1181, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12692:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1180, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12692:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12669:33:0" + }, + "payable": false, + "returnParameters": { + "id": 1185, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1184, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1193, + "src": "12728:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1183, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12728:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12727:9:0" + }, + "scope": 1194, + "src": "12645:131:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + } + ], + "scope": 1394, + "src": "989:11789:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "documentation": "@title ERC20Basic\n@dev Simpler version of ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/179", + "fullyImplemented": false, + "id": 1221, + "linearizedBaseContracts": [ + 1221 + ], + "name": "ERC20Basic", + "nodeType": "ContractDefinition", + "nodes": [ + { + "constant": false, + "id": 1196, + "name": "totalSupply", + "nodeType": "VariableDeclaration", + "scope": 1221, + "src": "12932:26:0", + "stateVariable": true, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1195, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "12932:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1203, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "balanceOf", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1199, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1198, + "name": "who", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "12981:11:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1197, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "12981:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "12980:13:0" + }, + "payable": false, + "returnParameters": { + "id": 1202, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1201, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1203, + "src": "13019:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1200, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13019:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13018:9:0" + }, + "scope": 1221, + "src": "12962:66:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1212, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transfer", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1208, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1205, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13049:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1204, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13049:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1207, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13061:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1206, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13061:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13048:27:0" + }, + "payable": false, + "returnParameters": { + "id": 1211, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1210, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1212, + "src": "13092:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1209, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13092:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13091:6:0" + }, + "scope": 1221, + "src": "13031:67:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1220, + "name": "Transfer", + "nodeType": "EventDefinition", + "parameters": { + "id": 1219, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1214, + "indexed": true, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13116:20:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1213, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13116:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1216, + "indexed": true, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13138:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1215, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13138:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1218, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1220, + "src": "13158:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1217, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13158:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13115:57:0" + }, + "src": "13101:72:0" + } + ], + "scope": 1394, + "src": "12908:267:0" + }, + { + "baseContracts": [ + { + "arguments": null, + "baseName": { + "contractScope": null, + "id": 1222, + "name": "ERC20Basic", + "nodeType": "UserDefinedTypeName", + "referencedDeclaration": 1221, + "src": "13285:10:0", + "typeDescriptions": { + "typeIdentifier": "t_contract$_ERC20Basic_$1221", + "typeString": "contract ERC20Basic" + } + }, + "id": 1223, + "nodeType": "InheritanceSpecifier", + "src": "13285:10:0" + } + ], + "contractDependencies": [ + 1221 + ], + "contractKind": "contract", + "documentation": "@title ERC20 interface\n@dev see https://github.com/ethereum/EIPs/issues/20", + "fullyImplemented": false, + "id": 1261, + "linearizedBaseContracts": [ + 1261, + 1221 + ], + "name": "ERC20", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": null, + "documentation": null, + "id": 1232, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "allowance", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1228, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1225, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13319:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1224, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13319:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1227, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13334:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1226, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13334:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13318:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1231, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1230, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1232, + "src": "13376:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1229, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13376:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13375:9:0" + }, + "scope": 1261, + "src": "13300:85:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1243, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "transferFrom", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1239, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1234, + "name": "from", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13410:12:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1233, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13410:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1236, + "name": "to", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13424:10:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1235, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13424:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1238, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13436:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1237, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13436:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13409:41:0" + }, + "payable": false, + "returnParameters": { + "id": 1242, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1241, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1243, + "src": "13467:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1240, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13467:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13466:6:0" + }, + "scope": 1261, + "src": "13388:85:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "body": null, + "documentation": null, + "id": 1252, + "implemented": false, + "isConstructor": false, + "isDeclaredConst": false, + "modifiers": [], + "name": "approve", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1248, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1245, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13493:15:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1244, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13493:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1247, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13510:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1246, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13510:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13492:32:0" + }, + "payable": false, + "returnParameters": { + "id": 1251, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1250, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1252, + "src": "13541:4:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "typeName": { + "id": 1249, + "name": "bool", + "nodeType": "ElementaryTypeName", + "src": "13541:4:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13540:6:0" + }, + "scope": 1261, + "src": "13476:71:0", + "stateMutability": "nonpayable", + "superFunction": null, + "visibility": "public" + }, + { + "anonymous": false, + "documentation": null, + "id": 1260, + "name": "Approval", + "nodeType": "EventDefinition", + "parameters": { + "id": 1259, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1254, + "indexed": true, + "name": "owner", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13565:21:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1253, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13565:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1256, + "indexed": true, + "name": "spender", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13588:23:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + }, + "typeName": { + "id": 1255, + "name": "address", + "nodeType": "ElementaryTypeName", + "src": "13588:7:0", + "typeDescriptions": { + "typeIdentifier": "t_address", + "typeString": "address" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1258, + "indexed": false, + "name": "value", + "nodeType": "VariableDeclaration", + "scope": 1260, + "src": "13613:13:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1257, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13613:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13564:63:0" + }, + "src": "13550:78:0" + } + ], + "scope": 1394, + "src": "13267:363:0" + }, + { + "baseContracts": [], + "contractDependencies": [], + "contractKind": "library", + "documentation": "@title SafeMath\n@dev Math operations with safety checks that throw on error", + "fullyImplemented": true, + "id": 1393, + "linearizedBaseContracts": [ + 1393 + ], + "name": "SafeMath", + "nodeType": "ContractDefinition", + "nodes": [ + { + "body": { + "id": 1290, + "nodeType": "Block", + "src": "13817:90:0", + "statements": [ + { + "assignments": [ + 1271 + ], + "declarations": [ + { + "constant": false, + "id": 1271, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13827:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1270, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13827:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1275, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1274, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1272, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13839:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "*", + "rightExpression": { + "argumentTypes": null, + "id": 1273, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13843:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13839:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "13827:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_bool", + "typeString": "bool" + }, + "id": 1285, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1279, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1277, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13861:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "hexValue": "30", + "id": 1278, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "13866:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_0_by_1", + "typeString": "int_const 0" + }, + "value": "0" + }, + "src": "13861:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "nodeType": "BinaryOperation", + "operator": "||", + "rightExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1284, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1282, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1280, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13871:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1281, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1263, + "src": "13875:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "==", + "rightExpression": { + "argumentTypes": null, + "id": 1283, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1265, + "src": "13880:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "13871:10:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + }, + "src": "13861:20:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1276, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "13854:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1286, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "13854:28:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1287, + "nodeType": "ExpressionStatement", + "src": "13854:28:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1288, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1271, + "src": "13899:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1269, + "id": 1289, + "nodeType": "Return", + "src": "13892:8:0" + } + ] + }, + "documentation": null, + "id": 1291, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "mul", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1266, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1263, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13759:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1262, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13759:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1265, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13770:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1264, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13770:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13758:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1269, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1268, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1291, + "src": "13808:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1267, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13808:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13807:9:0" + }, + "scope": 1393, + "src": "13746:161:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1308, + "nodeType": "Block", + "src": "13984:216:0", + "statements": [ + { + "assignments": [ + 1301 + ], + "declarations": [ + { + "constant": false, + "id": 1301, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "14072:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1300, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14072:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1305, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1304, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1302, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1293, + "src": "14084:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "id": 1303, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1295, + "src": "14088:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14084:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14072:17:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1306, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1301, + "src": "14192:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1299, + "id": 1307, + "nodeType": "Return", + "src": "14185:8:0" + } + ] + }, + "documentation": null, + "id": 1309, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "div", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1296, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1293, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13926:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1292, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13926:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1295, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13937:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1294, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13937:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13925:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1299, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1298, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1309, + "src": "13975:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1297, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "13975:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "13974:9:0" + }, + "scope": 1393, + "src": "13913:287:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1328, + "nodeType": "Block", + "src": "14277:53:0", + "statements": [ + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1321, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1319, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14294:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "<=", + "rightExpression": { + "argumentTypes": null, + "id": 1320, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14299:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14294:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1318, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14287:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1322, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14287:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1323, + "nodeType": "ExpressionStatement", + "src": "14287:14:0" + }, + { + "expression": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1326, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1324, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1311, + "src": "14318:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "-", + "rightExpression": { + "argumentTypes": null, + "id": 1325, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1313, + "src": "14322:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14318:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1317, + "id": 1327, + "nodeType": "Return", + "src": "14311:12:0" + } + ] + }, + "documentation": null, + "id": 1329, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "sub", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1314, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1311, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14219:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1310, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14219:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1313, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14230:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1312, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14230:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14218:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1317, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1316, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1329, + "src": "14268:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1315, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14268:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14267:9:0" + }, + "scope": 1393, + "src": "14206:124:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1352, + "nodeType": "Block", + "src": "14407:76:0", + "statements": [ + { + "assignments": [ + 1339 + ], + "declarations": [ + { + "constant": false, + "id": 1339, + "name": "c", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14417:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1338, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14417:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1343, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1342, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1340, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14429:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "id": 1341, + "name": "b", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1333, + "src": "14433:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14429:5:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14417:17:0" + }, + { + "expression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1347, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1345, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14451:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": ">=", + "rightExpression": { + "argumentTypes": null, + "id": 1346, + "name": "a", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1331, + "src": "14456:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14451:6:0", + "typeDescriptions": { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_bool", + "typeString": "bool" + } + ], + "id": 1344, + "name": "assert", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1500, + "src": "14444:6:0", + "typeDescriptions": { + "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", + "typeString": "function (bool) pure" + } + }, + "id": 1348, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14444:14:0", + "typeDescriptions": { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 1349, + "nodeType": "ExpressionStatement", + "src": "14444:14:0" + }, + { + "expression": { + "argumentTypes": null, + "id": 1350, + "name": "c", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1339, + "src": "14475:1:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1337, + "id": 1351, + "nodeType": "Return", + "src": "14468:8:0" + } + ] + }, + "documentation": null, + "id": 1353, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "add", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1334, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1331, + "name": "a", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14349:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1330, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14349:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1333, + "name": "b", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14360:9:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1332, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14360:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14348:22:0" + }, + "payable": false, + "returnParameters": { + "id": 1337, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1336, + "name": "", + "nodeType": "VariableDeclaration", + "scope": 1353, + "src": "14398:7:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1335, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14398:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14397:9:0" + }, + "scope": 1393, + "src": "14336:147:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + }, + { + "body": { + "id": 1391, + "nodeType": "Block", + "src": "14768:257:0", + "statements": [ + { + "assignments": [ + 1365 + ], + "declarations": [ + { + "constant": false, + "id": 1365, + "name": "_numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14826:18:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1364, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14826:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1375, + "initialValue": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1367, + "name": "numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1355, + "src": "14851:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1373, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1368, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14862:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "nodeType": "BinaryOperation", + "operator": "**", + "rightExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1371, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "id": 1369, + "name": "precision", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1359, + "src": "14869:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "31", + "id": 1370, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14879:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_1_by_1", + "typeString": "int_const 1" + }, + "value": "1" + }, + "src": "14869:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1372, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14868:13:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "src": "14862:19:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1366, + "name": "mul", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1291, + "src": "14847:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1374, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14847:35:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14826:56:0" + }, + { + "assignments": [ + 1377 + ], + "declarations": [ + { + "constant": false, + "id": 1377, + "name": "_quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14931:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1376, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14931:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "id": 1387, + "initialValue": { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1386, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "commonType": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "id": 1383, + "isConstant": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "leftExpression": { + "argumentTypes": null, + "arguments": [ + { + "argumentTypes": null, + "id": 1379, + "name": "_numerator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1365, + "src": "14956:10:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + { + "argumentTypes": null, + "id": 1380, + "name": "denominator", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1357, + "src": "14968:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "expression": { + "argumentTypes": [ + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + ], + "id": 1378, + "name": "div", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1309, + "src": "14952:3:0", + "typeDescriptions": { + "typeIdentifier": "t_function_internal_view$_t_uint256_$_t_uint256_$returns$_t_uint256_$", + "typeString": "function (uint256,uint256) view returns (uint256)" + } + }, + "id": 1381, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "14952:28:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "+", + "rightExpression": { + "argumentTypes": null, + "hexValue": "35", + "id": 1382, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14983:1:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_5_by_1", + "typeString": "int_const 5" + }, + "value": "5" + }, + "src": "14952:32:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1384, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "14951:34:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "BinaryOperation", + "operator": "/", + "rightExpression": { + "argumentTypes": null, + "hexValue": "3130", + "id": 1385, + "isConstant": false, + "isLValue": false, + "isPure": true, + "kind": "number", + "lValueRequested": false, + "nodeType": "Literal", + "src": "14988:2:0", + "subdenomination": null, + "typeDescriptions": { + "typeIdentifier": "t_rational_10_by_1", + "typeString": "int_const 10" + }, + "value": "10" + }, + "src": "14951:39:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "nodeType": "VariableDeclarationStatement", + "src": "14931:59:0" + }, + { + "expression": { + "argumentTypes": null, + "components": [ + { + "argumentTypes": null, + "id": 1388, + "name": "_quotient", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 1377, + "src": "15008:9:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + } + ], + "id": 1389, + "isConstant": false, + "isInlineArray": false, + "isLValue": false, + "isPure": false, + "lValueRequested": false, + "nodeType": "TupleExpression", + "src": "15007:11:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "functionReturnParameters": 1363, + "id": 1390, + "nodeType": "Return", + "src": "15000:18:0" + } + ] + }, + "documentation": null, + "id": 1392, + "implemented": true, + "isConstructor": false, + "isDeclaredConst": true, + "modifiers": [], + "name": "percent", + "nodeType": "FunctionDefinition", + "parameters": { + "id": 1360, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1355, + "name": "numerator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14665:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1354, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14665:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1357, + "name": "denominator", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14684:19:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1356, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14684:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + }, + { + "constant": false, + "id": 1359, + "name": "precision", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14705:17:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1358, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14705:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14664:59:0" + }, + "payable": false, + "returnParameters": { + "id": 1363, + "nodeType": "ParameterList", + "parameters": [ + { + "constant": false, + "id": 1362, + "name": "quotient", + "nodeType": "VariableDeclaration", + "scope": 1392, + "src": "14750:16:0", + "stateVariable": false, + "storageLocation": "default", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + }, + "typeName": { + "id": 1361, + "name": "uint256", + "nodeType": "ElementaryTypeName", + "src": "14750:7:0", + "typeDescriptions": { + "typeIdentifier": "t_uint256", + "typeString": "uint256" + } + }, + "value": null, + "visibility": "internal" + } + ], + "src": "14749:18:0" + }, + "scope": 1393, + "src": "14648:377:0", + "stateMutability": "view", + "superFunction": null, + "visibility": "internal" + } + ], + "scope": 1394, + "src": "13723:1304:0" + } + ], + "src": "0:15029:0" + }, + "compiler": { + "name": "solc", + "version": "0.4.24+commit.e67f0147.Emscripten.clang" + }, + "networks": {}, + "schemaVersion": "3.3.2", + "updatedAt": "2021-05-01T11:15:37.998Z", + "devdoc": { + "methods": {}, + "title": "SafeMath" + }, + "userdoc": { + "methods": {} + } +} \ No newline at end of file diff --git a/contracts/Doneth.sol b/contracts/Doneth.sol index b6bd721f..f85e38a1 100644 --- a/contracts/Doneth.sol +++ b/contracts/Doneth.sol @@ -21,16 +21,16 @@ pragma solidity ^0.4.15; contract Ownable { address public owner; - function Ownable() { - owner = msg.sender; + function Ownable() public { + owner = tx.origin; } modifier onlyOwner() { - require(msg.sender == owner); + require(msg.sender == owner || tx.origin == owner); _; } - function transferOwnership(address newOwner) onlyOwner { + function transferOwnership(address newOwner) onlyOwner public { if (newOwner != address(0)) { owner = newOwner; } @@ -38,9 +38,11 @@ contract Ownable { } contract Doneth is Ownable { + address public implementation; + using SafeMath for uint256; - bool initiated; + bool public initialized; // Name of the contract string public name; @@ -81,16 +83,35 @@ contract Doneth is Ownable { uint256 totalWithdrawn; } - function Doneth() {} + // constructor() public { + // genesisBlockNumber = block.number; + // addMember(tx.origin, 1, true, ""); + // } + - function init(string _contractName, string _founderName) { - require(!initiated, "ALREADY_INITATED"); - initiated = true; + function init(string _contractName, string _founderName) public { + require(!initialized, "ALREADY INITIALIZED"); + initialized = true; + owner = tx.origin; + genesisBlockNumber = block.number; if (bytes(_contractName).length > 21) revert(); if (bytes(_founderName).length > 21) revert(); name = _contractName; - genesisBlockNumber = block.number; - addMember(msg.origin, 1, true, _founderName); + // addMember(founder, 1, true, _founderName); + + Member memory newMember; + newMember.exists = true; + newMember.admin = true; + newMember.memberName = _founderName; + + members[tx.origin] = newMember; + memberKeys.push(tx.origin); + // addShare(tx.origin, shares); + totalShares = totalShares.add(1); + members[tx.origin].shares = members[tx.origin].shares.add(1); + AddShare(tx.origin, 1, members[tx.origin].shares); + // AddShare(tx.origin, 1, members[tx.origin].shares); + // AddShare(msg.sender, 1, members[tx.origin].shares); } event Deposit(address from, uint value); @@ -132,7 +153,7 @@ contract Doneth is Ownable { return this.balance; } - function getContractInfo() public constant returns(string, address, uint256, uint256, uint256) { + function getContractInfo() public constant returns(string name, address owner, uint256 genesisBlockNumber, uint256 totalShares, uint256 totalWithdrawn) { return (string(name), owner, genesisBlockNumber, totalShares, totalWithdrawn); } @@ -142,11 +163,11 @@ contract Doneth is Ownable { } function checkERC20Balance(address token) public constant returns(uint256) { - uint256 balance = ERC20(token).balanceOf(address(this)); - if (!tokens[token].exists && balance > 0) { - tokens[token].exists = true; - } - return balance; + return ERC20(token).balanceOf(address(this)); + // if (!tokens[token].exists && balance > 0) { + // tokens[token].exists = true; + // } + // return balance; } // Function to add members to the contract diff --git a/contracts/Factory.sol b/contracts/Factory.sol new file mode 100644 index 00000000..18d0d15c --- /dev/null +++ b/contracts/Factory.sol @@ -0,0 +1,72 @@ +pragma solidity ^0.4.19; + +import "./Proxy.sol"; + +/** + * @dev Proxy Factory library to create multiple proxy instances at runtime + * + * @notice i modified this to use a contract instead of a library as it was causing errors + * + * These functions implement a simple Factory pattern that can be used to deploy + * multiple proxy instances when the implementation contract needs to be reused. + */ +contract Proxies { + // Contains the address of the implementation used for the proxies it creates. + struct ProxyFactory { address implementation; } + + /** + * @dev Returns the ProxyFactory struct with the impementation contract address. + * + * Initializes the factory struct by deploying the implementation contract and + * storing its address. + */ + function newFactory(bytes memory creationCode) internal returns (ProxyFactory memory) { + address implementationAddr = _deployImplementation(creationCode); + ProxyFactory memory factory = ProxyFactory(implementationAddr); + return factory; + } + + /** + * @dev Deploys a Proxy instance with `admin` and initialized with `initializerData + * + */ + function deploy(ProxyFactory storage self,address admin, bytes memory initializerData) internal returns (address) { + Proxy prox = new Proxy(self.implementation, admin, initializerData); + return address(prox); + } + + /** + * @dev Returns the address of the deployed implementation contract. + * + * Creates the implementation contract with `creationCode`. + */ + function _deployImplementation(bytes memory creationCode) private returns (address) { + address payable addr; + // solhint-disable-next-line no-inline-assembly + assembly { + addr := create(0, add(creationCode, 0x20), mload(creationCode)) + if iszero(extcodesize(addr)) { + revert(0, 0) + } + } + return addr; + } +} + +contract Factory is Proxies { + + // This struct contains the address of the implementation that is + // used for the proxies it creates. + ProxyFactory factory; + + constructor(bytes memory _creationCode) { + // Initializes the factory struct by deploying the implementation + // and storing its address. + factory = Proxies.newFactory(_creationCode); + } + + // initializerData is the encoded call to the initializer function. + function deployInstance(address admin, bytes memory initializerData) public returns (address) { + return deploy(factory, admin, initializerData); + } +} \ No newline at end of file diff --git a/contracts/Proxy.sol b/contracts/Proxy.sol new file mode 100644 index 00000000..26b808b6 --- /dev/null +++ b/contracts/Proxy.sol @@ -0,0 +1,35 @@ +pragma solidity ^0.4.18; + +/** + * @title Proxy + * @dev Gives the possibility to delegate any call to a foreign implementation. + */ +contract Proxy { + + /** + * @dev Tells the address of the implementation where every call will be delegated. + * @return address of the implementation to which it will be delegated + */ + function implementation() public view returns (address); + + /** + * @dev Fallback function allowing to perform a delegatecall to the given implementation. + * This function will return whatever the implementation call returns + */ + function () payable public { + address _impl = implementation(); + require(_impl != address(0)); + + assembly { + let ptr := mload(0x40) + calldatacopy(ptr, 0, calldatasize) + let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0) + let size := returndatasize + returndatacopy(ptr, 0, size) + + switch result + case 0 { revert(ptr, size) } + default { return(ptr, size) } + } + } +} \ No newline at end of file diff --git a/contracts/ProxyFactory.sol b/contracts/ProxyFactory.sol new file mode 100644 index 00000000..3cd4ceba --- /dev/null +++ b/contracts/ProxyFactory.sol @@ -0,0 +1,80 @@ +/*** +* Shoutouts: +* +* Bytecode origin https://www.reddit.com/r/ethereum/comments/6ic49q/any_assembly_programmers_willing_to_write_a/dj5ceuw/ +* Modified version of Vitalik's https://www.reddit.com/r/ethereum/comments/6c1jui/delegatecall_forwarders_how_to_save_5098_on/ +* Credits to Jorge Izquierdo (@izqui) for coming up with this design here: https://gist.github.com/izqui/7f904443e6d19c1ab52ec7f5ad46b3a8 +* Credits to Stefan George (@Georgi87) for inspiration for many of the improvements from Gnosis Safe: https://github.com/gnosis/gnosis-safe-contracts +* +* This version has many improvements over the original @izqui's library like using REVERT instead of THROWing on failed calls. +* It also implements the awesome design pattern for initializing code as seen in Gnosis Safe Factory: https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/ProxyFactory.sol +* but unlike this last one it doesn't require that you waste storage on both the proxy and the proxied contracts (v. https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/Proxy.sol#L8 & https://github.com/gnosis/gnosis-safe-contracts/blob/master/contracts/GnosisSafe.sol#L14) +* +* +* v0.0.2 +* The proxy is now only 60 bytes long in total. Constructor included. +* No functionalities were added. The change was just to make the proxy leaner. +* +* v0.0.3 +* Thanks @dacarley for noticing the incorrect check for the subsequent call to the proxy. πŸ™Œ +* Note: I'm creating a new version of this that doesn't need that one call. +* Will add tests and put this in its own repository soonβ„’. +* +* v0.0.4 +* All the merit in this fix + update of the factory is @dacarley 's. πŸ™Œ +* Thank you! πŸ˜„ +* +* Potential updates can be found at https://gist.github.com/GNSPS/ba7b88565c947cfd781d44cf469c2ddb +* +***/ + +pragma solidity ^0.4.19; + + +/* solhint-disable no-inline-assembly, indent, state-visibility, avoid-low-level-calls */ + +contract ProxyFactory { + // address public target; + + function ProxyFactory() public { + } + + event ProxyDeployed(address proxyAddress, address targetAddress); + + function createProxy(address _target, bytes _data) + public + payable + returns (address proxyContract) + { + // address _target = ControllerPointer(target).getERC20Main(); + proxyContract = createProxyImpl(_target, _data); + + ProxyDeployed(proxyContract, _target); + } + + function createProxyImpl(address _target, bytes _data) + internal + returns (address proxyContract) + { + assembly { + let contractCode := mload(0x40) // Find empty storage location using "free memory pointer" + + mstore(add(contractCode, 0x0b), _target) // Add target address, with a 11 bytes [i.e. 23 - (32 - 20)] offset to later accomodate first part of the bytecode + mstore(sub(contractCode, 0x09), 0x000000000000000000603160008181600b9039f3600080808080368092803773) // First part of the bytecode, shifted left by 9 bytes, overwrites left padding of target address + mstore(add(contractCode, 0x2b), 0x5af43d828181803e808314602f57f35bfd000000000000000000000000000000) // Final part of bytecode, offset by 43 bytes + + proxyContract := create(0, contractCode, 60) // total length 60 bytes + if iszero(extcodesize(proxyContract)) { + revert(0, 0) + } + + // check if the _data.length > 0 and if it is forward it to the newly created contract + let dataLength := mload(_data) + if iszero(iszero(dataLength)) { + if iszero(call(gas, proxyContract, callvalue, add(_data, 0x20), dataLength, 0, 0)) { + revert(0, 0) + } + } + } + } +} \ No newline at end of file diff --git a/migrations/2_deploy_contracts.js b/migrations/2_deploy_doneth.js similarity index 100% rename from migrations/2_deploy_contracts.js rename to migrations/2_deploy_doneth.js diff --git a/migrations/3_deploy_proxy_factory.js b/migrations/3_deploy_proxy_factory.js new file mode 100644 index 00000000..de02a708 --- /dev/null +++ b/migrations/3_deploy_proxy_factory.js @@ -0,0 +1,5 @@ +var ProxyFactory = artifacts.require("./ProxyFactory.sol"); + +module.exports = function(deployer) { + deployer.deploy(ProxyFactory); +}; diff --git a/package.json b/package.json index 6506088f..2e4de5f7 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "chalk": "^2.0.1", "copy-webpack-plugin": "^4.0.1", "css-loader": "^0.28.0", + "dotenv": "^8.2.0", "eslint": "^4.15.0", "eslint-config-standard": "^10.2.1", "eslint-friendly-formatter": "^3.0.0", @@ -64,6 +65,7 @@ "sass-loader": "7.3.1", "semver": "^5.3.0", "shelljs": "^0.7.6", + "truffle-hdwallet-provider": "^1.0.17", "uglifyjs-webpack-plugin": "^1.1.1", "url-loader": "^0.5.8", "vue-loader": "^13.3.0", diff --git a/src/components/Deploy.vue b/src/components/Deploy.vue index dd244f60..822c525b 100644 --- a/src/components/Deploy.vue +++ b/src/components/Deploy.vue @@ -13,12 +13,12 @@