{ "contractName": "SplitPayment", "abi": [ { "constant": true, "inputs": [], "name": "totalShares", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "uint256" } ], "name": "payees", "outputs": [ { "name": "", "type": "address" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "released", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "contractName", "type": "string" }, { "name": "migrationId", "type": "string" } ], "name": "isMigrated", "outputs": [ { "name": "", "type": "bool" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "", "type": "address" } ], "name": "shares", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "totalReleased", "outputs": [ { "name": "", "type": "uint256" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "payable": true, "stateMutability": "payable", "type": "fallback" }, { "anonymous": false, "inputs": [ { "indexed": false, "name": "contractName", "type": "string" }, { "indexed": false, "name": "migrationId", "type": "string" } ], "name": "Migrated", "type": "event" }, { "constant": false, "inputs": [ { "name": "_payees", "type": "address[]" }, { "name": "_shares", "type": "uint256[]" } ], "name": "initialize", "outputs": [], "payable": true, "stateMutability": "payable", "type": "function" }, { "constant": false, "inputs": [], "name": "claim", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x60806040526000600155600060025534801561001a57600080fd5b50610c448061002a6000396000f30060806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633a98ef39146100905780634e71d92d146100bb57806363037b0c146100d25780637fbbe46f1461013f5780639852595c146101db578063c0bac1a814610232578063ce7c2ac2146102f9578063e33b7de314610350575b005b34801561009c57600080fd5b506100a561037b565b6040518082815260200191505060405180910390f35b3480156100c757600080fd5b506100d0610381565b005b3480156100de57600080fd5b506100fd600480360381019080803590602001909291905050506105f0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101d9600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061062e565b005b3480156101e757600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610912565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102df600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061092a565b604051808215151515815260200191505060405180910390f35b34801561030557600080fd5b5061033a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a15565b6040518082815260200191505060405180910390f35b34801561035c57600080fd5b50610365610a2d565b6040518082815260200191505060405180910390f35b60015481565b60008060003392506000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115156103d757600080fd5b6104036002543073ffffffffffffffffffffffffffffffffffffffff1631610a3390919063ffffffff16565b91506104bc600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104ae6001546104a0600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205487610a4f90919063ffffffff16565b610a8790919063ffffffff16565b610a9d90919063ffffffff16565b9050600081141515156104ce57600080fd5b803073ffffffffffffffffffffffffffffffffffffffff1631101515156104f457600080fd5b61054681600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a3390919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061059e81600254610a3390919063ffffffff16565b6002819055508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156105ea573d6000803e3d6000fd5b50505050565b6005818154811015156105ff57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040805190810160405280600c81526020017f53706c69745061796d656e7400000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e300000000000000000000000000000000000000000000000000000008152506106a6828261092a565b1515156106b257600080fd5b835185511415156106c257600080fd5b600092505b84518310156107155761070885848151811015156106e157fe5b9060200190602002015185858151811015156106f957fe5b90602001906020020151610ab6565b82806001019350506106c7565b7fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561077c578082015181840152602081019050610761565b50505050905090810190601f1680156107a95780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156107e25780820151818401526020810190506107c7565b50505050905090810190601f16801561080f5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b6020831015156108585780518252602082019150602081019050602083039250610833565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156108c1578051825260208201915060208101905060208303925061089c565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055505050505050565b60046020528060005260406000206000915090505481565b600080836040518082805190602001908083835b602083101515610963578051825260208201915060208101905060208303925061093e565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156109cc57805182526020820191506020810190506020830392506109a7565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b60036020528060005260406000206000915090505481565b60025481565b60008183019050828110151515610a4657fe5b80905092915050565b600080831415610a625760009050610a81565b8183029050818382811515610a7357fe5b04141515610a7d57fe5b8090505b92915050565b60008183811515610a9457fe5b04905092915050565b6000828211151515610aab57fe5b818303905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610af257600080fd5b600081111515610b0157600080fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141515610b4f57600080fd5b60058290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c0e81600154610a3390919063ffffffff16565b60018190555050505600a165627a7a7230582045475b68c5e9b392767dbdc59d33c11e9d4a45e956a1aaebe932bb5223bb13ef0029", "deployedBytecode": "0x60806040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633a98ef39146100905780634e71d92d146100bb57806363037b0c146100d25780637fbbe46f1461013f5780639852595c146101db578063c0bac1a814610232578063ce7c2ac2146102f9578063e33b7de314610350575b005b34801561009c57600080fd5b506100a561037b565b6040518082815260200191505060405180910390f35b3480156100c757600080fd5b506100d0610381565b005b3480156100de57600080fd5b506100fd600480360381019080803590602001909291905050506105f0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101d9600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061062e565b005b3480156101e757600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610912565b6040518082815260200191505060405180910390f35b34801561023e57600080fd5b506102df600480360381019080803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509192919290803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919291929050505061092a565b604051808215151515815260200191505060405180910390f35b34801561030557600080fd5b5061033a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a15565b6040518082815260200191505060405180910390f35b34801561035c57600080fd5b50610365610a2d565b6040518082815260200191505060405180910390f35b60015481565b60008060003392506000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541115156103d757600080fd5b6104036002543073ffffffffffffffffffffffffffffffffffffffff1631610a3390919063ffffffff16565b91506104bc600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104ae6001546104a0600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205487610a4f90919063ffffffff16565b610a8790919063ffffffff16565b610a9d90919063ffffffff16565b9050600081141515156104ce57600080fd5b803073ffffffffffffffffffffffffffffffffffffffff1631101515156104f457600080fd5b61054681600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a3390919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061059e81600254610a3390919063ffffffff16565b6002819055508273ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156105ea573d6000803e3d6000fd5b50505050565b6005818154811015156105ff57fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006040805190810160405280600c81526020017f53706c69745061796d656e7400000000000000000000000000000000000000008152506040805190810160405280600581526020017f312e392e300000000000000000000000000000000000000000000000000000008152506106a6828261092a565b1515156106b257600080fd5b835185511415156106c257600080fd5b600092505b84518310156107155761070885848151811015156106e157fe5b9060200190602002015185858151811015156106f957fe5b90602001906020020151610ab6565b82806001019350506106c7565b7fdd117a11c22118c9dee4b5a67ce578bc44529dce21ee0ccc439588fbb9fb4ea38282604051808060200180602001838103835285818151815260200191508051906020019080838360005b8381101561077c578082015181840152602081019050610761565b50505050905090810190601f1680156107a95780820380516001836020036101000a031916815260200191505b50838103825284818151815260200191508051906020019080838360005b838110156107e25780820151818401526020810190506107c7565b50505050905090810190601f16801561080f5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a160016000836040518082805190602001908083835b6020831015156108585780518252602082019150602081019050602083039250610833565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156108c1578051825260208201915060208101905060208303925061089c565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060006101000a81548160ff0219169083151502179055505050505050565b60046020528060005260406000206000915090505481565b600080836040518082805190602001908083835b602083101515610963578051825260208201915060208101905060208303925061093e565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020826040518082805190602001908083835b6020831015156109cc57805182526020820191506020810190506020830392506109a7565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902060009054906101000a900460ff16905092915050565b60036020528060005260406000206000915090505481565b60025481565b60008183019050828110151515610a4657fe5b80905092915050565b600080831415610a625760009050610a81565b8183029050818382811515610a7357fe5b04141515610a7d57fe5b8090505b92915050565b60008183811515610a9457fe5b04905092915050565b6000828211151515610aab57fe5b818303905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610af257600080fd5b600081111515610b0157600080fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141515610b4f57600080fd5b60058290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505080600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c0e81600154610a3390919063ffffffff16565b60018190555050505600a165627a7a7230582045475b68c5e9b392767dbdc59d33c11e9d4a45e956a1aaebe932bb5223bb13ef0029", "sourceMap": "274:1602:30:-;;;374:1;345:30;;410:1;379:32;;274:1602;8:9:-1;5:2;;;30:1;27;20:12;5:2;274:1602:30;;;;;;;", "deployedSourceMap": "274:1602:30:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;345:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;345:30:30;;;;;;;;;;;;;;;;;;;;;;;977:465;;8:9:-1;5:2;;;30:1;27;20:12;5:2;977:465:30;;;;;;508:23;;8:9:-1;5:2;;;30:1;27;20:12;5:2;508:23:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;570:276;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;461:43;;8:9:-1;5:2;;;30:1;27;20:12;5:2;461:43:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1950:140:52;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1950:140:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;416:41:30;;8:9:-1;5:2;;;30:1;27;20:12;5:2;416:41:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;379:32;;8:9:-1;5:2;;;30:1;27;20:12;5:2;379:32:30;;;;;;;;;;;;;;;;;;;;;;;345:30;;;;:::o;977:465::-;1007:13;1073:21;1143:15;1023:10;1007:26;;1064:1;1048:6;:13;1055:5;1048:13;;;;;;;;;;;;;;;;:17;1040:26;;;;;;;;1097:40;1123:13;;1105:4;1097:21;;;:25;;:40;;;;:::i;:::-;1073:64;;1161:70;1215:8;:15;1224:5;1215:15;;;;;;;;;;;;;;;;1161:49;1198:11;;1161:32;1179:6;:13;1186:5;1179:13;;;;;;;;;;;;;;;;1161;:17;;:32;;;;:::i;:::-;:36;;:49;;;;:::i;:::-;:53;;:70;;;;:::i;:::-;1143:88;;1257:1;1246:7;:12;;1238:21;;;;;;;;1298:7;1281:4;1273:21;;;:32;;1265:41;;;;;;;;1331:28;1351:7;1331:8;:15;1340:5;1331:15;;;;;;;;;;;;;;;;:19;;:28;;;;:::i;:::-;1313:8;:15;1322:5;1313:15;;;;;;;;;;;;;;;:46;;;;1381:26;1399:7;1381:13;;:17;;:26;;;;:::i;:::-;1365:13;:42;;;;1414:5;:14;;:23;1429:7;1414:23;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1414:23:30;977:465;;;:::o;508:23::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;570:276::-;755:9;1004:223:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1083:37;1094:12;1108:11;1083:10;:37::i;:::-;1082:38;1074:47;;;;;;;;728:7:30;:14;710:7;:14;:32;702:41;;;;;;;;767:1;755:13;;750:92;774:7;:14;770:1;:18;750:92;;;803:32;812:7;820:1;812:10;;;;;;;;;;;;;;;;;;824:7;832:1;824:10;;;;;;;;;;;;;;;;;;803:8;:32::i;:::-;790:3;;;;;;;750:92;;;1139:35:52;1148:12;1162:11;1139:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;1139:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1218:4;1180:8;1189:12;1180:22;;;;;;;;;;;;;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;;;1180:22:52;;;;;;;;;;;;;;;;;;;;;1203:11;1180:35;;;;;;;;;;;;;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;;;1180:35:52;;;;;;;;;;;;;;;;;;;;;;:42;;;;;;;;;;;;;;;;;;570:276:30;;;;;:::o;461:43::-;;;;;;;;;;;;;;;;;:::o;1950:140:52:-;2031:4;2050:8;2059:12;2050:22;;;;;;;;;;;;;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;;;2050:22:52;;;;;;;;;;;;;;;;;;;;;2073:11;2050:35;;;;;;;;;;;;;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;;;2050:35:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2043:42;;1950:140;;;;:::o;416:41:30:-;;;;;;;;;;;;;;;;;:::o;379:32::-;;;;:::o;1008:123:6:-;1066:9;1091:1;1087;:5;1083:9;;1110:1;1105;:6;;1098:14;;;;;;1125:1;1118:8;;1008:123;;;;:::o;203:167::-;261:9;287:1;282;:6;278:35;;;305:1;298:8;;;;278:35;326:1;322;:5;318:9;;349:1;344;340;:5;;;;;;;;:10;333:18;;;;;;364:1;357:8;;203:167;;;;;:::o;452:272::-;510:7;718:1;714;:5;;;;;;;;707:12;;452:272;;;;:::o;836:110::-;894:7;921:1;916;:6;;909:14;;;;;;940:1;936;:5;929:12;;836:110;;;;:::o;1614:260:30:-;1706:1;1688:20;;:6;:20;;;;1680:29;;;;;;;;1733:1;1723:7;:11;1715:20;;;;;;;;1767:1;1749:6;:14;1756:6;1749:14;;;;;;;;;;;;;;;;:19;1741:28;;;;;;;;1776:6;1788;1776:19;;39:1:-1;33:3;27:10;23:18;57:10;52:3;45:23;79:10;72:17;;0:93;1776:19:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1818:7;1801:6;:14;1808:6;1801:14;;;;;;;;;;;;;;;:24;;;;1845;1861:7;1845:11;;:15;;:24;;;;:::i;:::-;1831:11;:38;;;;1614:260;;:::o", "source": "pragma solidity ^0.4.21;\n\nimport \"../math/SafeMath.sol\";\nimport \"zos-lib/contracts/migrations/Migratable.sol\";\n\n\n/**\n * @title SplitPayment\n * @dev Base contract that supports multiple payees claiming funds sent to this contract\n * according to the proportion they own.\n */\ncontract SplitPayment is Migratable {\n using SafeMath for uint256;\n\n uint256 public totalShares = 0;\n uint256 public totalReleased = 0;\n\n mapping(address => uint256) public shares;\n mapping(address => uint256) public released;\n address[] public payees;\n\n /**\n * @dev Constructor\n */\n function initialize(address[] _payees, uint256[] _shares)\n isInitializer(\"SplitPayment\", \"1.9.0\")\n public\n payable\n {\n require(_payees.length == _shares.length);\n\n for (uint256 i = 0; i < _payees.length; i++) {\n addPayee(_payees[i], _shares[i]);\n }\n }\n\n /**\n * @dev payable fallback\n */\n function () public payable {}\n\n /**\n * @dev Claim your share of the balance.\n */\n function claim() public {\n address payee = msg.sender;\n\n require(shares[payee] > 0);\n\n uint256 totalReceived = address(this).balance.add(totalReleased);\n uint256 payment = totalReceived.mul(shares[payee]).div(totalShares).sub(released[payee]);\n\n require(payment != 0);\n require(address(this).balance >= payment);\n\n released[payee] = released[payee].add(payment);\n totalReleased = totalReleased.add(payment);\n\n payee.transfer(payment);\n }\n\n /**\n * @dev Add a new payee to the contract.\n * @param _payee The address of the payee to add.\n * @param _shares The number of shares owned by the payee.\n */\n function addPayee(address _payee, uint256 _shares) internal {\n require(_payee != address(0));\n require(_shares > 0);\n require(shares[_payee] == 0);\n\n payees.push(_payee);\n shares[_payee] = _shares;\n totalShares = totalShares.add(_shares);\n }\n}\n", "sourcePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/SplitPayment.sol", "ast": { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/SplitPayment.sol", "exportedSymbols": { "SplitPayment": [ 2119 ] }, "id": 2120, "nodeType": "SourceUnit", "nodes": [ { "id": 1914, "literals": [ "solidity", "^", "0.4", ".21" ], "nodeType": "PragmaDirective", "src": "0:24:30" }, { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol", "file": "../math/SafeMath.sol", "id": 1915, "nodeType": "ImportDirective", "scope": 2120, "sourceUnit": 537, "src": "26:30:30", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "zos-lib/contracts/migrations/Migratable.sol", "file": "zos-lib/contracts/migrations/Migratable.sol", "id": 1916, "nodeType": "ImportDirective", "scope": 2120, "sourceUnit": 4770, "src": "57:53:30", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1917, "name": "Migratable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4769, "src": "299:10:30", "typeDescriptions": { "typeIdentifier": "t_contract$_Migratable_$4769", "typeString": "contract Migratable" } }, "id": 1918, "nodeType": "InheritanceSpecifier", "src": "299:10:30" } ], "contractDependencies": [ 4769 ], "contractKind": "contract", "documentation": "@title SplitPayment\n@dev Base contract that supports multiple payees claiming funds sent to this contract\naccording to the proportion they own.", "fullyImplemented": true, "id": 2119, "linearizedBaseContracts": [ 2119, 4769 ], "name": "SplitPayment", "nodeType": "ContractDefinition", "nodes": [ { "id": 1921, "libraryName": { "contractScope": null, "id": 1919, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 536, "src": "320:8:30", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$536", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "314:27:30", "typeName": { "id": 1920, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "333:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "constant": false, "id": 1924, "name": "totalShares", "nodeType": "VariableDeclaration", "scope": 2119, "src": "345:30:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1922, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "345:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 1923, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "374:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 1927, "name": "totalReleased", "nodeType": "VariableDeclaration", "scope": 2119, "src": "379:32:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1925, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "379:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 1926, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "410:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 1931, "name": "shares", "nodeType": "VariableDeclaration", "scope": 2119, "src": "416:41:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 1930, "keyType": { "id": 1928, "name": "address", "nodeType": "ElementaryTypeName", "src": "424:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "416:27:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 1929, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "435:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 1935, "name": "released", "nodeType": "VariableDeclaration", "scope": 2119, "src": "461:43:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 1934, "keyType": { "id": 1932, "name": "address", "nodeType": "ElementaryTypeName", "src": "469:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "461:27:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 1933, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "480:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 1938, "name": "payees", "nodeType": "VariableDeclaration", "scope": 2119, "src": "508:23:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[]" }, "typeName": { "baseType": { "id": 1936, "name": "address", "nodeType": "ElementaryTypeName", "src": "508:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1937, "length": null, "nodeType": "ArrayTypeName", "src": "508:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "public" }, { "body": { "id": 1981, "nodeType": "Block", "src": "696:150:30", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1956, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1952, "name": "_payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1941, "src": "710:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "id": 1953, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "710:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1954, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1944, "src": "728:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, "id": 1955, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "728:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "710:32:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1951, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "702:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1957, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "702:41:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1958, "nodeType": "ExpressionStatement", "src": "702:41:30" }, { "body": { "id": 1979, "nodeType": "Block", "src": "795:47:30", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1971, "name": "_payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1941, "src": "812:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "id": 1973, "indexExpression": { "argumentTypes": null, "id": 1972, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "820:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "812:10:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1974, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1944, "src": "824:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, "id": 1976, "indexExpression": { "argumentTypes": null, "id": 1975, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "832:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "824:10:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1970, "name": "addPayee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2118, "src": "803:8:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 1977, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "803:32:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1978, "nodeType": "ExpressionStatement", "src": "803:32:30" } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1966, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1963, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "770:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1964, "name": "_payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1941, "src": "774:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "id": 1965, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "774:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "770:18:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 1980, "initializationExpression": { "assignments": [ 1960 ], "declarations": [ { "constant": false, "id": 1960, "name": "i", "nodeType": "VariableDeclaration", "scope": 1982, "src": "755:9:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1959, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "755:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1962, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 1961, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "767:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "755:13:30" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 1968, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "790:3:30", "subExpression": { "argumentTypes": null, "id": 1967, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "790:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1969, "nodeType": "ExpressionStatement", "src": "790:3:30" }, "nodeType": "ForStatement", "src": "750:92:30" } ] }, "documentation": "@dev Constructor", "id": 1982, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": [ { "argumentTypes": null, "hexValue": "53706c69745061796d656e74", "id": 1947, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "646:14:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4b60630cc6e8bf8cded4efdaf68aa37ef2d37ee92c72162f90d45b8ea5779f3b", "typeString": "literal_string \"SplitPayment\"" }, "value": "SplitPayment" }, { "argumentTypes": null, "hexValue": "312e392e30", "id": 1948, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "662:7:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c", "typeString": "literal_string \"1.9.0\"" }, "value": "1.9.0" } ], "id": 1949, "modifierName": { "argumentTypes": null, "id": 1946, "name": "isInitializer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4716, "src": "632:13:30", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$", "typeString": "modifier (string memory,string memory)" } }, "nodeType": "ModifierInvocation", "src": "632:38:30" } ], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 1945, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1941, "name": "_payees", "nodeType": "VariableDeclaration", "scope": 1982, "src": "590:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 1939, "name": "address", "nodeType": "ElementaryTypeName", "src": "590:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1940, "length": null, "nodeType": "ArrayTypeName", "src": "590:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1944, "name": "_shares", "nodeType": "VariableDeclaration", "scope": 1982, "src": "609:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 1942, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "609:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1943, "length": null, "nodeType": "ArrayTypeName", "src": "609:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "value": null, "visibility": "internal" } ], "src": "589:38:30" }, "payable": true, "returnParameters": { "id": 1950, "nodeType": "ParameterList", "parameters": [], "src": "696:0:30" }, "scope": 2119, "src": "570:276:30", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1985, "nodeType": "Block", "src": "916:2:30", "statements": [] }, "documentation": "@dev payable fallback", "id": 1986, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1983, "nodeType": "ParameterList", "parameters": [], "src": "898:2:30" }, "payable": true, "returnParameters": { "id": 1984, "nodeType": "ParameterList", "parameters": [], "src": "916:0:30" }, "scope": 2119, "src": "889:29:30", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2068, "nodeType": "Block", "src": "1001:441:30", "statements": [ { "assignments": [ 1990 ], "declarations": [ { "constant": false, "id": 1990, "name": "payee", "nodeType": "VariableDeclaration", "scope": 2069, "src": "1007:13:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1989, "name": "address", "nodeType": "ElementaryTypeName", "src": "1007:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 1993, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1991, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4784, "src": "1023:3:30", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1992, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1023:10:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1007:26:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1999, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1995, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1048:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 1997, "indexExpression": { "argumentTypes": null, "id": 1996, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1055:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1048:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 1998, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1064:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1048:17:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1994, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1040:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2000, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1040:26:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2001, "nodeType": "ExpressionStatement", "src": "1040:26:30" }, { "assignments": [ 2003 ], "declarations": [ { "constant": false, "id": 2003, "name": "totalReceived", "nodeType": "VariableDeclaration", "scope": 2069, "src": "1073:21:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2002, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1073:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2011, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2009, "name": "totalReleased", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1927, "src": "1123:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2005, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4895, "src": "1105:4:30", "typeDescriptions": { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } ], "id": 2004, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1097:7:30", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2006, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1097:13:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2007, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balance", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1097:21:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2008, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1097:25:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2010, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1097:40:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1073:64:30" }, { "assignments": [ 2013 ], "declarations": [ { "constant": false, "id": 2013, "name": "payment", "nodeType": "VariableDeclaration", "scope": 2069, "src": "1143:15:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2012, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1143:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2028, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2024, "name": "released", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1935, "src": "1215:8:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2026, "indexExpression": { "argumentTypes": null, "id": 2025, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1224:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1215:15:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2021, "name": "totalShares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1924, "src": "1198:11:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2016, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1179:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2018, "indexExpression": { "argumentTypes": null, "id": 2017, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1186:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1179:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2014, "name": "totalReceived", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2003, "src": "1161:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2015, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 477, "src": "1161:17:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2019, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:32:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2020, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 491, "src": "1161:36:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2022, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:49:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2023, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 511, "src": "1161:53:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2027, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:70:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1143:88:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2032, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2030, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1246:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2031, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1257:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1246:12:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2029, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1238:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2033, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1238:21:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2034, "nodeType": "ExpressionStatement", "src": "1238:21:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2037, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4895, "src": "1281:4:30", "typeDescriptions": { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } ], "id": 2036, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1273:7:30", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2038, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1273:13:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2039, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balance", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1273:21:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 2040, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1298:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1273:32:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2035, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1265:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2042, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1265:41:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2043, "nodeType": "ExpressionStatement", "src": "1265:41:30" }, { "expression": { "argumentTypes": null, "id": 2053, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2044, "name": "released", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1935, "src": "1313:8:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2046, "indexExpression": { "argumentTypes": null, "id": 2045, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1322:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1313:15:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2051, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1351:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2047, "name": "released", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1935, "src": "1331:8:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2049, "indexExpression": { "argumentTypes": null, "id": 2048, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1340:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1331:15:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2050, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1331:19:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2052, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1331:28:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1313:46:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2054, "nodeType": "ExpressionStatement", "src": "1313:46:30" }, { "expression": { "argumentTypes": null, "id": 2060, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2055, "name": "totalReleased", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1927, "src": "1365:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2058, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1399:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2056, "name": "totalReleased", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1927, "src": "1381:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2057, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1381:17:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2059, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1381:26:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1365:42:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2061, "nodeType": "ExpressionStatement", "src": "1365:42:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2065, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1429:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2062, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1414:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1414:14:30", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 2066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1414:23:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2067, "nodeType": "ExpressionStatement", "src": "1414:23:30" } ] }, "documentation": "@dev Claim your share of the balance.", "id": 2069, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "claim", "nodeType": "FunctionDefinition", "parameters": { "id": 1987, "nodeType": "ParameterList", "parameters": [], "src": "991:2:30" }, "payable": false, "returnParameters": { "id": 1988, "nodeType": "ParameterList", "parameters": [], "src": "1001:0:30" }, "scope": 2119, "src": "977:465:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2117, "nodeType": "Block", "src": "1674:200:30", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2081, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2077, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1688:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1706:1:30", "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": 2078, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1698:7:30", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2080, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1698:10:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1688:20:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2076, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1680:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2082, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1680:29:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2083, "nodeType": "ExpressionStatement", "src": "1680:29:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2087, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2085, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2073, "src": "1723:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2086, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1733:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1723:11:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2084, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1715:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2088, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1715:20:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2089, "nodeType": "ExpressionStatement", "src": "1715:20:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2095, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2091, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1749:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2093, "indexExpression": { "argumentTypes": null, "id": 2092, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1756:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1749:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2094, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1767:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1749:19:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2090, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1741:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2096, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1741:28:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2097, "nodeType": "ExpressionStatement", "src": "1741:28:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2101, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1788:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "id": 2098, "name": "payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1938, "src": "1776:6:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2100, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1776:11:30", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, "id": 2102, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1776:19:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2103, "nodeType": "ExpressionStatement", "src": "1776:19:30" }, { "expression": { "argumentTypes": null, "id": 2108, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2104, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1801:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2106, "indexExpression": { "argumentTypes": null, "id": 2105, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1808:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1801:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2107, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2073, "src": "1818:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1801:24:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2109, "nodeType": "ExpressionStatement", "src": "1801:24:30" }, { "expression": { "argumentTypes": null, "id": 2115, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2110, "name": "totalShares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1924, "src": "1831:11:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2113, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2073, "src": "1861:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2111, "name": "totalShares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1924, "src": "1845:11:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2112, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1845:15:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2114, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1845:24:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1831:38:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2116, "nodeType": "ExpressionStatement", "src": "1831:38:30" } ] }, "documentation": "@dev Add a new payee to the contract.\n@param _payee The address of the payee to add.\n@param _shares The number of shares owned by the payee.", "id": 2118, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "addPayee", "nodeType": "FunctionDefinition", "parameters": { "id": 2074, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2071, "name": "_payee", "nodeType": "VariableDeclaration", "scope": 2118, "src": "1632:14:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2070, "name": "address", "nodeType": "ElementaryTypeName", "src": "1632:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2073, "name": "_shares", "nodeType": "VariableDeclaration", "scope": 2118, "src": "1648:15:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2072, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1648:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1631:33:30" }, "payable": false, "returnParameters": { "id": 2075, "nodeType": "ParameterList", "parameters": [], "src": "1674:0:30" }, "scope": 2119, "src": "1614:260:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 2120, "src": "274:1602:30" } ], "src": "0:1877:30" }, "legacyAST": { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/payment/SplitPayment.sol", "exportedSymbols": { "SplitPayment": [ 2119 ] }, "id": 2120, "nodeType": "SourceUnit", "nodes": [ { "id": 1914, "literals": [ "solidity", "^", "0.4", ".21" ], "nodeType": "PragmaDirective", "src": "0:24:30" }, { "absolutePath": "/home/spalladino/Projects/openzeppelin-zos/contracts/math/SafeMath.sol", "file": "../math/SafeMath.sol", "id": 1915, "nodeType": "ImportDirective", "scope": 2120, "sourceUnit": 537, "src": "26:30:30", "symbolAliases": [], "unitAlias": "" }, { "absolutePath": "zos-lib/contracts/migrations/Migratable.sol", "file": "zos-lib/contracts/migrations/Migratable.sol", "id": 1916, "nodeType": "ImportDirective", "scope": 2120, "sourceUnit": 4770, "src": "57:53:30", "symbolAliases": [], "unitAlias": "" }, { "baseContracts": [ { "arguments": null, "baseName": { "contractScope": null, "id": 1917, "name": "Migratable", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 4769, "src": "299:10:30", "typeDescriptions": { "typeIdentifier": "t_contract$_Migratable_$4769", "typeString": "contract Migratable" } }, "id": 1918, "nodeType": "InheritanceSpecifier", "src": "299:10:30" } ], "contractDependencies": [ 4769 ], "contractKind": "contract", "documentation": "@title SplitPayment\n@dev Base contract that supports multiple payees claiming funds sent to this contract\naccording to the proportion they own.", "fullyImplemented": true, "id": 2119, "linearizedBaseContracts": [ 2119, 4769 ], "name": "SplitPayment", "nodeType": "ContractDefinition", "nodes": [ { "id": 1921, "libraryName": { "contractScope": null, "id": 1919, "name": "SafeMath", "nodeType": "UserDefinedTypeName", "referencedDeclaration": 536, "src": "320:8:30", "typeDescriptions": { "typeIdentifier": "t_contract$_SafeMath_$536", "typeString": "library SafeMath" } }, "nodeType": "UsingForDirective", "src": "314:27:30", "typeName": { "id": 1920, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "333:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, { "constant": false, "id": 1924, "name": "totalShares", "nodeType": "VariableDeclaration", "scope": 2119, "src": "345:30:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1922, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "345:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 1923, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "374:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 1927, "name": "totalReleased", "nodeType": "VariableDeclaration", "scope": 2119, "src": "379:32:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1925, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "379:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": { "argumentTypes": null, "hexValue": "30", "id": 1926, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "410:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "visibility": "public" }, { "constant": false, "id": 1931, "name": "shares", "nodeType": "VariableDeclaration", "scope": 2119, "src": "416:41:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 1930, "keyType": { "id": 1928, "name": "address", "nodeType": "ElementaryTypeName", "src": "424:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "416:27:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 1929, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "435:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 1935, "name": "released", "nodeType": "VariableDeclaration", "scope": 2119, "src": "461:43:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "typeName": { "id": 1934, "keyType": { "id": 1932, "name": "address", "nodeType": "ElementaryTypeName", "src": "469:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "Mapping", "src": "461:27:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" }, "valueType": { "id": 1933, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "480:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } }, "value": null, "visibility": "public" }, { "constant": false, "id": 1938, "name": "payees", "nodeType": "VariableDeclaration", "scope": 2119, "src": "508:23:30", "stateVariable": true, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[]" }, "typeName": { "baseType": { "id": 1936, "name": "address", "nodeType": "ElementaryTypeName", "src": "508:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1937, "length": null, "nodeType": "ArrayTypeName", "src": "508:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "public" }, { "body": { "id": 1981, "nodeType": "Block", "src": "696:150:30", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1956, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1952, "name": "_payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1941, "src": "710:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "id": 1953, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "710:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1954, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1944, "src": "728:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, "id": 1955, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "728:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "710:32:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1951, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "702:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 1957, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "702:41:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1958, "nodeType": "ExpressionStatement", "src": "702:41:30" }, { "body": { "id": 1979, "nodeType": "Block", "src": "795:47:30", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1971, "name": "_payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1941, "src": "812:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "id": 1973, "indexExpression": { "argumentTypes": null, "id": 1972, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "820:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "812:10:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1974, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1944, "src": "824:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[] memory" } }, "id": 1976, "indexExpression": { "argumentTypes": null, "id": 1975, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "832:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "824:10:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" }, { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "id": 1970, "name": "addPayee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2118, "src": "803:8:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_nonpayable$_t_address_$_t_uint256_$returns$__$", "typeString": "function (address,uint256)" } }, "id": 1977, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "803:32:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 1978, "nodeType": "ExpressionStatement", "src": "803:32:30" } ] }, "condition": { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1966, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 1963, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "770:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "<", "rightExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1964, "name": "_payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1941, "src": "774:7:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[] memory" } }, "id": 1965, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "length", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "774:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "770:18:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } }, "id": 1980, "initializationExpression": { "assignments": [ 1960 ], "declarations": [ { "constant": false, "id": 1960, "name": "i", "nodeType": "VariableDeclaration", "scope": 1982, "src": "755:9:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 1959, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "755:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 1962, "initialValue": { "argumentTypes": null, "hexValue": "30", "id": 1961, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "767:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "nodeType": "VariableDeclarationStatement", "src": "755:13:30" }, "loopExpression": { "expression": { "argumentTypes": null, "id": 1968, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "nodeType": "UnaryOperation", "operator": "++", "prefix": false, "src": "790:3:30", "subExpression": { "argumentTypes": null, "id": 1967, "name": "i", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1960, "src": "790:1:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1969, "nodeType": "ExpressionStatement", "src": "790:3:30" }, "nodeType": "ForStatement", "src": "750:92:30" } ] }, "documentation": "@dev Constructor", "id": 1982, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [ { "arguments": [ { "argumentTypes": null, "hexValue": "53706c69745061796d656e74", "id": 1947, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "646:14:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_4b60630cc6e8bf8cded4efdaf68aa37ef2d37ee92c72162f90d45b8ea5779f3b", "typeString": "literal_string \"SplitPayment\"" }, "value": "SplitPayment" }, { "argumentTypes": null, "hexValue": "312e392e30", "id": 1948, "isConstant": false, "isLValue": false, "isPure": true, "kind": "string", "lValueRequested": false, "nodeType": "Literal", "src": "662:7:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_stringliteral_48b337767c221abef259fe87e655d8fa1026fb5e60ec68ad68fa7e00bb7f050c", "typeString": "literal_string \"1.9.0\"" }, "value": "1.9.0" } ], "id": 1949, "modifierName": { "argumentTypes": null, "id": 1946, "name": "isInitializer", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4716, "src": "632:13:30", "typeDescriptions": { "typeIdentifier": "t_modifier$_t_string_memory_ptr_$_t_string_memory_ptr_$", "typeString": "modifier (string memory,string memory)" } }, "nodeType": "ModifierInvocation", "src": "632:38:30" } ], "name": "initialize", "nodeType": "FunctionDefinition", "parameters": { "id": 1945, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 1941, "name": "_payees", "nodeType": "VariableDeclaration", "scope": 1982, "src": "590:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", "typeString": "address[]" }, "typeName": { "baseType": { "id": 1939, "name": "address", "nodeType": "ElementaryTypeName", "src": "590:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 1940, "length": null, "nodeType": "ArrayTypeName", "src": "590:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", "typeString": "address[]" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 1944, "name": "_shares", "nodeType": "VariableDeclaration", "scope": 1982, "src": "609:17:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_memory_ptr", "typeString": "uint256[]" }, "typeName": { "baseType": { "id": 1942, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "609:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 1943, "length": null, "nodeType": "ArrayTypeName", "src": "609:9:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_uint256_$dyn_storage_ptr", "typeString": "uint256[]" } }, "value": null, "visibility": "internal" } ], "src": "589:38:30" }, "payable": true, "returnParameters": { "id": 1950, "nodeType": "ParameterList", "parameters": [], "src": "696:0:30" }, "scope": 2119, "src": "570:276:30", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { "id": 1985, "nodeType": "Block", "src": "916:2:30", "statements": [] }, "documentation": "@dev payable fallback", "id": 1986, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "", "nodeType": "FunctionDefinition", "parameters": { "id": 1983, "nodeType": "ParameterList", "parameters": [], "src": "898:2:30" }, "payable": true, "returnParameters": { "id": 1984, "nodeType": "ParameterList", "parameters": [], "src": "916:0:30" }, "scope": 2119, "src": "889:29:30", "stateMutability": "payable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2068, "nodeType": "Block", "src": "1001:441:30", "statements": [ { "assignments": [ 1990 ], "declarations": [ { "constant": false, "id": 1990, "name": "payee", "nodeType": "VariableDeclaration", "scope": 2069, "src": "1007:13:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 1989, "name": "address", "nodeType": "ElementaryTypeName", "src": "1007:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" } ], "id": 1993, "initialValue": { "argumentTypes": null, "expression": { "argumentTypes": null, "id": 1991, "name": "msg", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4784, "src": "1023:3:30", "typeDescriptions": { "typeIdentifier": "t_magic_message", "typeString": "msg" } }, "id": 1992, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sender", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1023:10:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "VariableDeclarationStatement", "src": "1007:26:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 1999, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 1995, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1048:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 1997, "indexExpression": { "argumentTypes": null, "id": 1996, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1055:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1048:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 1998, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1064:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1048:17:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 1994, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1040:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2000, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1040:26:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2001, "nodeType": "ExpressionStatement", "src": "1040:26:30" }, { "assignments": [ 2003 ], "declarations": [ { "constant": false, "id": 2003, "name": "totalReceived", "nodeType": "VariableDeclaration", "scope": 2069, "src": "1073:21:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2002, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1073:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2011, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2009, "name": "totalReleased", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1927, "src": "1123:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2005, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4895, "src": "1105:4:30", "typeDescriptions": { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } ], "id": 2004, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1097:7:30", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2006, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1097:13:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2007, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balance", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1097:21:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2008, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1097:25:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2010, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1097:40:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1073:64:30" }, { "assignments": [ 2013 ], "declarations": [ { "constant": false, "id": 2013, "name": "payment", "nodeType": "VariableDeclaration", "scope": 2069, "src": "1143:15:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2012, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1143:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "id": 2028, "initialValue": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2024, "name": "released", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1935, "src": "1215:8:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2026, "indexExpression": { "argumentTypes": null, "id": 2025, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1224:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1215:15:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2021, "name": "totalShares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1924, "src": "1198:11:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2016, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1179:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2018, "indexExpression": { "argumentTypes": null, "id": 2017, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1186:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1179:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2014, "name": "totalReceived", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2003, "src": "1161:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2015, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "mul", "nodeType": "MemberAccess", "referencedDeclaration": 477, "src": "1161:17:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2019, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:32:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2020, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "div", "nodeType": "MemberAccess", "referencedDeclaration": 491, "src": "1161:36:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2022, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:49:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2023, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "sub", "nodeType": "MemberAccess", "referencedDeclaration": 511, "src": "1161:53:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2027, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1161:70:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "VariableDeclarationStatement", "src": "1143:88:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2032, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2030, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1246:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2031, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1257:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1246:12:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2029, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1238:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2033, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1238:21:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2034, "nodeType": "ExpressionStatement", "src": "1238:21:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2041, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2037, "name": "this", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 4895, "src": "1281:4:30", "typeDescriptions": { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_contract$_SplitPayment_$2119", "typeString": "contract SplitPayment" } ], "id": 2036, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1273:7:30", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2038, "isConstant": false, "isLValue": false, "isPure": false, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1273:13:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2039, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "balance", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1273:21:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">=", "rightExpression": { "argumentTypes": null, "id": 2040, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1298:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1273:32:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2035, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1265:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2042, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1265:41:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2043, "nodeType": "ExpressionStatement", "src": "1265:41:30" }, { "expression": { "argumentTypes": null, "id": 2053, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2044, "name": "released", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1935, "src": "1313:8:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2046, "indexExpression": { "argumentTypes": null, "id": 2045, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1322:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1313:15:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2051, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1351:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2047, "name": "released", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1935, "src": "1331:8:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2049, "indexExpression": { "argumentTypes": null, "id": 2048, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1340:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1331:15:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2050, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1331:19:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2052, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1331:28:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1313:46:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2054, "nodeType": "ExpressionStatement", "src": "1313:46:30" }, { "expression": { "argumentTypes": null, "id": 2060, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2055, "name": "totalReleased", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1927, "src": "1365:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2058, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1399:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2056, "name": "totalReleased", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1927, "src": "1381:13:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2057, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1381:17:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2059, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1381:26:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1365:42:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2061, "nodeType": "ExpressionStatement", "src": "1365:42:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2065, "name": "payment", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2013, "src": "1429:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2062, "name": "payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1990, "src": "1414:5:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "id": 2064, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "transfer", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1414:14:30", "typeDescriptions": { "typeIdentifier": "t_function_transfer_nonpayable$_t_uint256_$returns$__$", "typeString": "function (uint256)" } }, "id": 2066, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1414:23:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2067, "nodeType": "ExpressionStatement", "src": "1414:23:30" } ] }, "documentation": "@dev Claim your share of the balance.", "id": 2069, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "claim", "nodeType": "FunctionDefinition", "parameters": { "id": 1987, "nodeType": "ParameterList", "parameters": [], "src": "991:2:30" }, "payable": false, "returnParameters": { "id": 1988, "nodeType": "ParameterList", "parameters": [], "src": "1001:0:30" }, "scope": 2119, "src": "977:465:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "public" }, { "body": { "id": 2117, "nodeType": "Block", "src": "1674:200:30", "statements": [ { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_address", "typeString": "address" }, "id": 2081, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2077, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1688:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "nodeType": "BinaryOperation", "operator": "!=", "rightExpression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "hexValue": "30", "id": 2079, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1706:1:30", "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": 2078, "isConstant": false, "isLValue": false, "isPure": true, "lValueRequested": false, "nodeType": "ElementaryTypeNameExpression", "src": "1698:7:30", "typeDescriptions": { "typeIdentifier": "t_type$_t_address_$", "typeString": "type(address)" }, "typeName": "address" }, "id": 2080, "isConstant": false, "isLValue": false, "isPure": true, "kind": "typeConversion", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1698:10:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "src": "1688:20:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2076, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1680:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2082, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1680:29:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2083, "nodeType": "ExpressionStatement", "src": "1680:29:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2087, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "id": 2085, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2073, "src": "1723:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": ">", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2086, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1733:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1723:11:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2084, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1715:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2088, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1715:20:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2089, "nodeType": "ExpressionStatement", "src": "1715:20:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "commonType": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "id": 2095, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftExpression": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2091, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1749:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2093, "indexExpression": { "argumentTypes": null, "id": 2092, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1756:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": false, "nodeType": "IndexAccess", "src": "1749:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "BinaryOperation", "operator": "==", "rightExpression": { "argumentTypes": null, "hexValue": "30", "id": 2094, "isConstant": false, "isLValue": false, "isPure": true, "kind": "number", "lValueRequested": false, "nodeType": "Literal", "src": "1767:1:30", "subdenomination": null, "typeDescriptions": { "typeIdentifier": "t_rational_0_by_1", "typeString": "int_const 0" }, "value": "0" }, "src": "1749:19:30", "typeDescriptions": { "typeIdentifier": "t_bool", "typeString": "bool" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_bool", "typeString": "bool" } ], "id": 2090, "name": "require", "nodeType": "Identifier", "overloadedDeclarations": [ 4787, 4788 ], "referencedDeclaration": 4787, "src": "1741:7:30", "typeDescriptions": { "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", "typeString": "function (bool) pure" } }, "id": 2096, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1741:28:30", "typeDescriptions": { "typeIdentifier": "t_tuple$__$", "typeString": "tuple()" } }, "id": 2097, "nodeType": "ExpressionStatement", "src": "1741:28:30" }, { "expression": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2101, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1788:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_address", "typeString": "address" } ], "expression": { "argumentTypes": null, "id": 2098, "name": "payees", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1938, "src": "1776:6:30", "typeDescriptions": { "typeIdentifier": "t_array$_t_address_$dyn_storage", "typeString": "address[] storage ref" } }, "id": 2100, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "push", "nodeType": "MemberAccess", "referencedDeclaration": null, "src": "1776:11:30", "typeDescriptions": { "typeIdentifier": "t_function_arraypush_nonpayable$_t_address_$returns$_t_uint256_$", "typeString": "function (address) returns (uint256)" } }, "id": 2102, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1776:19:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2103, "nodeType": "ExpressionStatement", "src": "1776:19:30" }, { "expression": { "argumentTypes": null, "id": 2108, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "baseExpression": { "argumentTypes": null, "id": 2104, "name": "shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1931, "src": "1801:6:30", "typeDescriptions": { "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$", "typeString": "mapping(address => uint256)" } }, "id": 2106, "indexExpression": { "argumentTypes": null, "id": 2105, "name": "_payee", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2071, "src": "1808:6:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "isConstant": false, "isLValue": true, "isPure": false, "lValueRequested": true, "nodeType": "IndexAccess", "src": "1801:14:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "id": 2107, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2073, "src": "1818:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1801:24:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2109, "nodeType": "ExpressionStatement", "src": "1801:24:30" }, { "expression": { "argumentTypes": null, "id": 2115, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "leftHandSide": { "argumentTypes": null, "id": 2110, "name": "totalShares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1924, "src": "1831:11:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "nodeType": "Assignment", "operator": "=", "rightHandSide": { "argumentTypes": null, "arguments": [ { "argumentTypes": null, "id": 2113, "name": "_shares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 2073, "src": "1861:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } } ], "expression": { "argumentTypes": [ { "typeIdentifier": "t_uint256", "typeString": "uint256" } ], "expression": { "argumentTypes": null, "id": 2111, "name": "totalShares", "nodeType": "Identifier", "overloadedDeclarations": [], "referencedDeclaration": 1924, "src": "1845:11:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2112, "isConstant": false, "isLValue": false, "isPure": false, "lValueRequested": false, "memberName": "add", "nodeType": "MemberAccess", "referencedDeclaration": 535, "src": "1845:15:30", "typeDescriptions": { "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$bound_to$_t_uint256_$", "typeString": "function (uint256,uint256) pure returns (uint256)" } }, "id": 2114, "isConstant": false, "isLValue": false, "isPure": false, "kind": "functionCall", "lValueRequested": false, "names": [], "nodeType": "FunctionCall", "src": "1845:24:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "src": "1831:38:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "id": 2116, "nodeType": "ExpressionStatement", "src": "1831:38:30" } ] }, "documentation": "@dev Add a new payee to the contract.\n@param _payee The address of the payee to add.\n@param _shares The number of shares owned by the payee.", "id": 2118, "implemented": true, "isConstructor": false, "isDeclaredConst": false, "modifiers": [], "name": "addPayee", "nodeType": "FunctionDefinition", "parameters": { "id": 2074, "nodeType": "ParameterList", "parameters": [ { "constant": false, "id": 2071, "name": "_payee", "nodeType": "VariableDeclaration", "scope": 2118, "src": "1632:14:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" }, "typeName": { "id": 2070, "name": "address", "nodeType": "ElementaryTypeName", "src": "1632:7:30", "typeDescriptions": { "typeIdentifier": "t_address", "typeString": "address" } }, "value": null, "visibility": "internal" }, { "constant": false, "id": 2073, "name": "_shares", "nodeType": "VariableDeclaration", "scope": 2118, "src": "1648:15:30", "stateVariable": false, "storageLocation": "default", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" }, "typeName": { "id": 2072, "name": "uint256", "nodeType": "ElementaryTypeName", "src": "1648:7:30", "typeDescriptions": { "typeIdentifier": "t_uint256", "typeString": "uint256" } }, "value": null, "visibility": "internal" } ], "src": "1631:33:30" }, "payable": false, "returnParameters": { "id": 2075, "nodeType": "ParameterList", "parameters": [], "src": "1674:0:30" }, "scope": 2119, "src": "1614:260:30", "stateMutability": "nonpayable", "superFunction": null, "visibility": "internal" } ], "scope": 2120, "src": "274:1602:30" } ], "src": "0:1877:30" }, "compiler": { "name": "solc", "version": "0.4.24+commit.e67f0147.Emscripten.clang" }, "networks": {}, "schemaVersion": "2.0.1", "updatedAt": "2018-08-23T14:35:50.637Z" }