{"fileName":"Crowdloan.sol","contractName":"Crowdloan","source":"pragma solidity 0.5.11;\n\nimport \"zos-lib/contracts/Initializable.sol\";\nimport \"openzeppelin-eth/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-eth/contracts/token/ERC20/IERC20.sol\";\nimport \"openzeppelin-eth/contracts/token/ERC20/SafeERC20.sol\";\n\ncontract Crowdloan is Initializable {\n    using SafeMath for uint256;\n    using SafeERC20 for IERC20;\n\n    // Loan terms\n    uint256 public crowdfundStart;\n    uint256 public crowdfundEnd; // Last time contributions are accepted\n    uint256 public crowdfundDuration;\n    address public borrower;\n    IERC20 public token;\n    uint256 public principalRequested;\n    uint256 public repaymentCap;\n    string public loanMetadataUrl;\n\n    // Contributor tracking\n    mapping(address => uint256) public amountContributed;\n    uint256 public totalContributed;\n    uint256 public principalWithdrawn;\n\n    // Repayment tracking\n    uint256 public amountRepaid;\n    mapping(address => uint256) public repaymentWithdrawn;\n    uint256 public totalRepaymentWithdrawn;\n\n    // Events\n    event Fund(address sender, uint256 amount);\n    event WithdrawPrincipal(address borrower, uint256 amount);\n    event WithdrawRepayment(address lender, uint256 amount);\n    event Repay(uint256 amount);\n    event StartCrowdfund(uint256 crowdfundStart);\n\n    function initialize(\n        address _borrower,\n        IERC20 _token,\n        uint256 _principalRequested,\n        uint256 _repaymentCap,\n        uint256 _duration,\n        string calldata _loanMetadataUrl\n    ) external initializer {\n        borrower = _borrower;\n        crowdfundDuration = _duration;\n        token = _token;\n        principalRequested = _principalRequested;\n        loanMetadataUrl = _loanMetadataUrl;\n        repaymentCap = _repaymentCap;\n    }\n\n    /// @dev During the crowdfund, anyone can fund and get repayment rights in proportion to their contribution\n    function fund(uint256 amount) external {\n        _onlyAfterCrowdfundStart();\n        _onlyBeforeCrowdfundEnd();\n\n        require(amount > 0, \"Fund amount cannot be zero\");\n\n        totalContributed = totalContributed.add(amount);\n        require(\n            totalContributed <= principalRequested,\n            \"Your contribution would exceed the total amount requested.\"\n        );\n\n        amountContributed[msg.sender] = amountContributed[msg.sender].add(amount);\n\n        token.safeTransferFrom(msg.sender, address(this), amount);\n\n        emit Fund(msg.sender, amount);\n    }\n\n    /// @dev Borrower can withdraw currently aquired principal in any proportion, and any time during the crowdfund for flexibility.\n    /// This DOES NOT affect the total principal that can be raised or the loan terms, it merely provides cash flow.\n    function withdrawPrincipal(uint256 amount) external {\n        _onlyBorrower();\n\n        // FIX DONATIONS!\n        uint256 tokenBalance = token.balanceOf(address(this));\n\n        require(amount <= tokenBalance, \"Insufficent tokens to withdraw\");\n\n        if (amountRepaid > 0) {\n            require(\n                tokenBalance.sub(amount) >= amountRepaid.sub(totalRepaymentWithdrawn),\n                \"Withdrawal will lead to repayment inbalance\"\n            );\n        }\n\n        principalWithdrawn = principalWithdrawn.add(amount);\n        token.safeTransfer(msg.sender, amount);\n\n        emit WithdrawPrincipal(msg.sender, amount);\n    }\n\n    /// @dev Anyone can make repayments on behalf of the borrower\n    function repay(uint256 amount) external {\n        _onlyAfterCrowdfundEnd();\n\n        require(amount > 0, \"Repayment amount cannot be zero\");\n        require(amountRepaid.add(amount) <= repaymentCap, \"Must not exceed repayment cap\");\n\n        amountRepaid = amountRepaid.add(amount);\n        token.safeTransferFrom(msg.sender, address(this), amount);\n\n        emit Repay(amount);\n    }\n\n    /// @dev Lenders can withdraw their proportional stake from repayments after the crowdfund ends\n    function withdrawRepayment() external {\n        _onlyAfterCrowdfundEnd();\n\n        uint256 totalOwed = amountRepaid.mul(amountContributed[msg.sender]).div(totalContributed);\n        uint256 amount = totalOwed.sub(repaymentWithdrawn[msg.sender]);\n        require(amount > 0, \"Withdrawal amount cannot be zero\");\n\n        repaymentWithdrawn[msg.sender] = totalOwed;\n        totalRepaymentWithdrawn = totalRepaymentWithdrawn.add(amount);\n\n        token.safeTransfer(msg.sender, amount);\n\n        emit WithdrawRepayment(msg.sender, amount);\n    }\n\n    /// @dev Borrower can start the crowdfund once\n    function startCrowdfund() external {\n        _onlyBorrower();\n        _onlyBeforeCrowdfundStart();\n\n        crowdfundStart = now;\n        crowdfundEnd = now + crowdfundDuration;\n\n        emit StartCrowdfund(now);\n    }\n\n    function _onlyBorrower() internal view {\n        require(msg.sender == borrower, \"Only the borrower can call function.\");\n    }\n\n    function _onlyBeforeCrowdfundStart() internal view {\n        require(crowdfundStart == 0, \"Only before crowdfund start\");\n    }\n\n    function _onlyAfterCrowdfundStart() internal view {\n        require(crowdfundStart != 0, \"Only after crowdfund start\");\n    }\n\n    function _onlyBeforeCrowdfundEnd() internal view {\n        require(now <= crowdfundEnd, \"Only before crowdfund end\");\n    }\n\n    function _onlyAfterCrowdfundEnd() internal view {\n        require(crowdfundStart != 0 && now > crowdfundEnd, \"Only after crowdfund end.\");\n    }\n}\n","sourcePath":"contracts/crowdloan/Crowdloan.sol","sourceMap":"250:5147:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;250:5147:0;;;;;;;;;;","deployedSourceMap":"250:5147:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;250:5147:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;769:31;;;:::i;:::-;;;;;;;;;;;;;;;;;;;964:38;;;:::i;:::-;;;;;;;;;;;;;;;;;;;614:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;711:52;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;711:52:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3412:384;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3412:384:0;;;;;;;;;;;;;;;;;:::i;:::-;;2699:641;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2699:641:0;;;;;;;;;;;;;;;;;:::i;:::-;;3902:542;;;:::i;:::-;;905:53;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;905:53:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;521:23;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;410:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;375:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;575:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4501:218;;;:::i;:::-;;1279:466;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;1279:466:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;8;5:28;2:2;;;46:1;43;36:12;2:2;1279:466:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;1279:466:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;1279:466:0;;;;;;;;;;;;;;:::i;:::-;;806:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;1863:580;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1863:580:0;;;;;;;;;;;;;;;;;:::i;:::-;;483:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;647:29;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;8:100;52:2;49:1;45:10;40:15;;8:100;;;12:14;647:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;872:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;550:19;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;769:31;;;;;;:::o;964:38::-;;;;;;:::o;614:27::-;;;;;;:::o;711:52::-;;;;;;;;;;;;;;;;;;;:::o;3412:384::-;3462:24;:22;:24;;:::i;:::-;3514:1;3505:6;:10;3497:54;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3597:12;;;;3569:24;3586:6;3569:12;;;;:16;;:24;;;;:::i;:::-;:40;;3561:82;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3669:24;3686:6;3669:12;;;;:16;;:24;;;;:::i;:::-;3654:12;;:39;;;;;;;3703:57;3726:10;3746:4;3753:6;3703:5;;;;;;;;;;;:22;;;;:57;;;;;;:::i;:::-;3776:13;3782:6;3776:13;;;;;;;;;;;;;;;;;;3412:384;;:::o;2699:641::-;2761:15;:13;:15;;:::i;:::-;2813:20;2836:5;;;;;;;;;;;:15;;;2860:4;2836:30;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2836:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2836:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2836:30:0;;;;;;;;;;;;;;;;2813:53;;2895:12;2885:6;:22;;2877:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2972:1;2957:12;;;;:16;2953:218;;;3042:41;3059:23;;;;3042:12;;;;:16;;:41;;;;:::i;:::-;3014:24;3031:6;3014:12;:16;;:24;;;;:::i;:::-;:69;;2989:171;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2953:218;3202:30;3225:6;3202:18;;;;:22;;:30;;;;:::i;:::-;3181:18;;:51;;;;;;;3242:38;3261:10;3273:6;3242:5;;;;;;;;;;;:18;;;;:38;;;;;:::i;:::-;3296:37;3314:10;3326:6;3296:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;2699:641;;;:::o;3902:542::-;3950:24;:22;:24;;:::i;:::-;3985:17;4005:69;4057:16;;;;4005:47;4022:17;;;:29;4040:10;4022:29;;;;;;;;;;;;;;;;;;4005:12;;;;:16;;:47;;;;:::i;:::-;:51;;:69;;;;:::i;:::-;3985:89;;4084:14;4101:45;4115:18;;;:30;4134:10;4115:30;;;;;;;;;;;;;;;;;;4101:9;:13;;:45;;;;:::i;:::-;4084:62;;4173:1;4164:6;:10;4156:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4255:9;4222:18;;;:30;4241:10;4222:30;;;;;;;;;;;;;;;;:42;;;;;;;4300:35;4328:6;4300:23;;;;:27;;:35;;;;:::i;:::-;4274:23;;:61;;;;;;;4346:38;4365:10;4377:6;4346:5;;;;;;;;;;;:18;;;;:38;;;;;:::i;:::-;4400:37;4418:10;4430:6;4400:37;;;;;;;;;;;;;;;;;;;;;;;;;;;;3902:542;;;:::o;905:53::-;;;;;;;;;;;;;;;;;;;:::o;521:23::-;;;;;;;;;;;;;:::o;410:27::-;;;;;;:::o;375:29::-;;;;;;:::o;575:33::-;;;;;;:::o;4501:218::-;4546:15;:13;:15;;:::i;:::-;4571:27;:25;:27;;:::i;:::-;4626:3;4609:14;;:20;;;;;;;4660:17;;;;4654:3;:23;4639:12;;:38;;;;;;;4693:19;4708:3;4693:19;;;;;;;;;;;;;;;;;;4501:218;:::o;1279:466::-;1024:12:18;;;;;;;;;;;:31;;;;1040:15;:13;:15;;:::i;:::-;1024:31;:47;;;;1060:11;;;;;;;;;;;1059:12;1024:47;1016:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1129:19;1152:12;;;;;;;;;;;1151:13;1129:35;;1174:14;1170:80;;;1213:4;1198:12;;:19;;;;;;;;;;;;;;;;;;1239:4;1225:11;;:18;;;;;;;;;;;;;;;;;;1170:80;1534:9:0;1523:8;;:20;;;;;;;;;;;;;;;;;;1573:9;1553:17;;:29;;;;;;;1600:6;1592:5;;:14;;;;;;;;;;;;;;;;;;1637:19;1616:18;;:40;;;;;;;1684:16;;1666:15;;:34;;;;;;;;:::i;:::-;;1725:13;1710:12;;:28;;;;;;;1256:1:18;1268:14;1264:55;;;1307:5;1292:12;;:20;;;;;;;;;;;;;;;;;;1264:55;1279:466:0;;;;;;;;;:::o;806:33::-;;;;;;:::o;1863:580::-;1912:26;:24;:26;;:::i;:::-;1948:25;:23;:25;;:::i;:::-;2001:1;1992:6;:10;1984:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2063:28;2084:6;2063:16;;;;:20;;:28;;;;:::i;:::-;2044:16;;:47;;;;;;;2142:18;;;;2122:16;;;;:38;;2101:143;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2287:41;2321:6;2287:17;;;:29;2305:10;2287:29;;;;;;;;;;;;;;;;;;:33;;:41;;;;:::i;:::-;2255:17;;;:29;2273:10;2255:29;;;;;;;;;;;;;;;;:73;;;;;;;2339:57;2362:10;2382:4;2389:6;2339:5;;;;;;;;;;;:22;;;;:57;;;;;;:::i;:::-;2412:24;2417:10;2429:6;2412:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;1863:580;;:::o;483:32::-;;;;;;:::o;647:29::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;872:27::-;;;;;;:::o;550:19::-;;;;;;;;;;;;;:::o;5251:144::-;5335:1;5317:14;;;;:19;;:41;;;;;5346:12;;;;5340:3;:18;5317:41;5309:79;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5251:144;:::o;1439:145:8:-;1497:7;1516:9;1532:1;1528;:5;1516:17;;1556:1;1551;:6;;1543:15;;;;;;;;1576:1;1569:8;;;;;1439:145;;;;;;:::o;842:202:15:-;942:95;961:5;991;:18;;;:27;;;;1020:4;1026:2;1030:5;968:68;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;968:68:15;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;968:68:15;942:18;:95;;:::i;:::-;842:202;;;;;:::o;4725:127:0:-;4796:8;;;;;;;;;;;4782:22;;:10;:22;;;4774:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4725:127;:::o;1211:145:8:-;1269:7;1301:1;1296;:6;;1288:15;;;;;;;;1313:9;1329:1;1325;:5;1313:17;;1348:1;1341:8;;;;;1211:145;;;;;;:::o;662:174:15:-;744:85;763:5;793;:14;;;:23;;;;818:2;822:5;770:58;;;;;;;;;;;;;;;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;770:58:15;;;;;;;38:4:-1;29:7;25:18;67:10;61:17;96:58;199:8;192:4;186;182:15;179:29;167:10;160:49;0:215;;;770:58:15;744:18;:85;;:::i;:::-;662:174;;;;:::o;231:421:8:-;289:7;534:1;529;:6;525:45;;;558:1;551:8;;;;525:45;580:9;596:1;592;:5;580:17;;624:1;619;615;:5;;;;;;;;:10;607:19;;;;;;;;644:1;637:8;;;;;231:421;;;;;;:::o;782:296::-;840:7;937:1;933;:5;925:14;;;;;;;;949:9;965:1;961;:5;;;;;;;;949:17;;1070:1;1063:8;;;;;782:296;;;;;;:::o;4858:127:0:-;4945:1;4927:14;;;;:19;4919:59;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4858:127;:::o;1409:467:18:-;1456:4;1797:10;1842:7;1830:20;1824:26;;1870:1;1864:2;:7;1857:14;;;;;1409:467;;;:::o;4991:125:0:-;5077:1;5059:14;;;;:19;;5051:58;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4991:125;:::o;5122:123::-;5196:12;;;;5189:3;:19;;5181:57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5122:123;:::o;2487:869:15:-;3030:27;3038:5;3030:25;;;;:27;;;:::i;:::-;3022:36;;;;;;;;3129:12;3143:23;3178:5;3170:19;;3190:4;3170:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;51:19;36:153;;;182:3;176:10;171:3;164:23;36:153;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;;;3170:25:15;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;3128:67:15;;;;3213:7;3205:16;;;;;;;;3256:1;3236:10;:17;:21;3232:118;;;3319:10;3308:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;3308:30:15;;;;;;;;;;;;;;;;3300:39;;;;;;;;3232:118;2487:869;;;;;:::o;463:616:17:-;523:4;539:12;1038:7;1026:20;1018:28;;1071:1;1064:4;:8;1057:15;;;;;463:616;;;;;:::o;250:5147:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o","abi":[{"constant":true,"inputs":[],"name":"totalContributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalRepaymentWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"repaymentCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amountContributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"repay","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawPrincipal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"withdrawRepayment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"repaymentWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"borrower","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"crowdfundEnd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"crowdfundStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"principalRequested","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"startCrowdfund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_borrower","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_principalRequested","type":"uint256"},{"internalType":"uint256","name":"_repaymentCap","type":"uint256"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"string","name":"_loanMetadataUrl","type":"string"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"principalWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"crowdfundDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loanMetadataUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"amountRepaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Fund","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"borrower","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawPrincipal","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"lender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawRepayment","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Repay","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"crowdfundStart","type":"uint256"}],"name":"StartCrowdfund","type":"event"}],"ast":{"absolutePath":"contracts/crowdloan/Crowdloan.sol","exportedSymbols":{"Crowdloan":[438]},"id":439,"nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","0.5",".11"],"nodeType":"PragmaDirective","src":"0:23:0"},{"absolutePath":"zos-lib/contracts/Initializable.sol","file":"zos-lib/contracts/Initializable.sol","id":2,"nodeType":"ImportDirective","scope":439,"sourceUnit":2629,"src":"25:45:0","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-eth/contracts/math/SafeMath.sol","file":"openzeppelin-eth/contracts/math/SafeMath.sol","id":3,"nodeType":"ImportDirective","scope":439,"sourceUnit":1307,"src":"71:54:0","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-eth/contracts/token/ERC20/IERC20.sol","file":"openzeppelin-eth/contracts/token/ERC20/IERC20.sol","id":4,"nodeType":"ImportDirective","scope":439,"sourceUnit":2124,"src":"126:59:0","symbolAliases":[],"unitAlias":""},{"absolutePath":"openzeppelin-eth/contracts/token/ERC20/SafeERC20.sol","file":"openzeppelin-eth/contracts/token/ERC20/SafeERC20.sol","id":5,"nodeType":"ImportDirective","scope":439,"sourceUnit":2339,"src":"186:62:0","symbolAliases":[],"unitAlias":""},{"baseContracts":[{"arguments":null,"baseName":{"contractScope":null,"id":6,"name":"Initializable","nodeType":"UserDefinedTypeName","referencedDeclaration":2628,"src":"272:13:0","typeDescriptions":{"typeIdentifier":"t_contract$_Initializable_$2628","typeString":"contract Initializable"}},"id":7,"nodeType":"InheritanceSpecifier","src":"272:13:0"}],"contractDependencies":[2628],"contractKind":"contract","documentation":null,"fullyImplemented":true,"id":438,"linearizedBaseContracts":[438,2628],"name":"Crowdloan","nodeType":"ContractDefinition","nodes":[{"id":10,"libraryName":{"contractScope":null,"id":8,"name":"SafeMath","nodeType":"UserDefinedTypeName","referencedDeclaration":1306,"src":"298:8:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeMath_$1306","typeString":"library SafeMath"}},"nodeType":"UsingForDirective","src":"292:27:0","typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"311:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},{"id":13,"libraryName":{"contractScope":null,"id":11,"name":"SafeERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":2338,"src":"330:9:0","typeDescriptions":{"typeIdentifier":"t_contract$_SafeERC20_$2338","typeString":"library SafeERC20"}},"nodeType":"UsingForDirective","src":"324:27:0","typeName":{"contractScope":null,"id":12,"name":"IERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":2123,"src":"344:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}}},{"constant":false,"id":15,"name":"crowdfundStart","nodeType":"VariableDeclaration","scope":438,"src":"375:29:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":14,"name":"uint256","nodeType":"ElementaryTypeName","src":"375:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":17,"name":"crowdfundEnd","nodeType":"VariableDeclaration","scope":438,"src":"410:27:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":16,"name":"uint256","nodeType":"ElementaryTypeName","src":"410:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":19,"name":"crowdfundDuration","nodeType":"VariableDeclaration","scope":438,"src":"483:32:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":18,"name":"uint256","nodeType":"ElementaryTypeName","src":"483:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":21,"name":"borrower","nodeType":"VariableDeclaration","scope":438,"src":"521:23:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":20,"name":"address","nodeType":"ElementaryTypeName","src":"521:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"public"},{"constant":false,"id":23,"name":"token","nodeType":"VariableDeclaration","scope":438,"src":"550:19:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"},"typeName":{"contractScope":null,"id":22,"name":"IERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":2123,"src":"550:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"value":null,"visibility":"public"},{"constant":false,"id":25,"name":"principalRequested","nodeType":"VariableDeclaration","scope":438,"src":"575:33:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":24,"name":"uint256","nodeType":"ElementaryTypeName","src":"575:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":27,"name":"repaymentCap","nodeType":"VariableDeclaration","scope":438,"src":"614:27:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":26,"name":"uint256","nodeType":"ElementaryTypeName","src":"614:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":29,"name":"loanMetadataUrl","nodeType":"VariableDeclaration","scope":438,"src":"647:29:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string"},"typeName":{"id":28,"name":"string","nodeType":"ElementaryTypeName","src":"647:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"public"},{"constant":false,"id":33,"name":"amountContributed","nodeType":"VariableDeclaration","scope":438,"src":"711:52:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":32,"keyType":{"id":30,"name":"address","nodeType":"ElementaryTypeName","src":"719:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"711:27:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"730:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":35,"name":"totalContributed","nodeType":"VariableDeclaration","scope":438,"src":"769:31:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":34,"name":"uint256","nodeType":"ElementaryTypeName","src":"769:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":37,"name":"principalWithdrawn","nodeType":"VariableDeclaration","scope":438,"src":"806:33:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"806:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":39,"name":"amountRepaid","nodeType":"VariableDeclaration","scope":438,"src":"872:27:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":38,"name":"uint256","nodeType":"ElementaryTypeName","src":"872:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"constant":false,"id":43,"name":"repaymentWithdrawn","nodeType":"VariableDeclaration","scope":438,"src":"905:53:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"typeName":{"id":42,"keyType":{"id":40,"name":"address","nodeType":"ElementaryTypeName","src":"913:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Mapping","src":"905:27:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"},"valueType":{"id":41,"name":"uint256","nodeType":"ElementaryTypeName","src":"924:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}},"value":null,"visibility":"public"},{"constant":false,"id":45,"name":"totalRepaymentWithdrawn","nodeType":"VariableDeclaration","scope":438,"src":"964:38:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":44,"name":"uint256","nodeType":"ElementaryTypeName","src":"964:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"public"},{"anonymous":false,"documentation":null,"id":51,"name":"Fund","nodeType":"EventDefinition","parameters":{"id":50,"nodeType":"ParameterList","parameters":[{"constant":false,"id":47,"indexed":false,"name":"sender","nodeType":"VariableDeclaration","scope":51,"src":"1034:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"1034:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":49,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":51,"src":"1050:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":48,"name":"uint256","nodeType":"ElementaryTypeName","src":"1050:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1033:32:0"},"src":"1023:43:0"},{"anonymous":false,"documentation":null,"id":57,"name":"WithdrawPrincipal","nodeType":"EventDefinition","parameters":{"id":56,"nodeType":"ParameterList","parameters":[{"constant":false,"id":53,"indexed":false,"name":"borrower","nodeType":"VariableDeclaration","scope":57,"src":"1095:16:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":52,"name":"address","nodeType":"ElementaryTypeName","src":"1095:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":55,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":57,"src":"1113:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":54,"name":"uint256","nodeType":"ElementaryTypeName","src":"1113:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1094:34:0"},"src":"1071:58:0"},{"anonymous":false,"documentation":null,"id":63,"name":"WithdrawRepayment","nodeType":"EventDefinition","parameters":{"id":62,"nodeType":"ParameterList","parameters":[{"constant":false,"id":59,"indexed":false,"name":"lender","nodeType":"VariableDeclaration","scope":63,"src":"1158:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":58,"name":"address","nodeType":"ElementaryTypeName","src":"1158:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":61,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":63,"src":"1174:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":60,"name":"uint256","nodeType":"ElementaryTypeName","src":"1174:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1157:32:0"},"src":"1134:56:0"},{"anonymous":false,"documentation":null,"id":67,"name":"Repay","nodeType":"EventDefinition","parameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"indexed":false,"name":"amount","nodeType":"VariableDeclaration","scope":67,"src":"1207:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64,"name":"uint256","nodeType":"ElementaryTypeName","src":"1207:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1206:16:0"},"src":"1195:28:0"},{"anonymous":false,"documentation":null,"id":71,"name":"StartCrowdfund","nodeType":"EventDefinition","parameters":{"id":70,"nodeType":"ParameterList","parameters":[{"constant":false,"id":69,"indexed":false,"name":"crowdfundStart","nodeType":"VariableDeclaration","scope":71,"src":"1249:22:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":68,"name":"uint256","nodeType":"ElementaryTypeName","src":"1249:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1248:24:0"},"src":"1228:45:0"},{"body":{"id":112,"nodeType":"Block","src":"1513:232:0","statements":[{"expression":{"argumentTypes":null,"id":90,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":88,"name":"borrower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":21,"src":"1523:8:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":89,"name":"_borrower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":73,"src":"1534:9:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"1523:20:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":91,"nodeType":"ExpressionStatement","src":"1523:20:0"},{"expression":{"argumentTypes":null,"id":94,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":92,"name":"crowdfundDuration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":19,"src":"1553:17:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":93,"name":"_duration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":81,"src":"1573:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1553:29:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":95,"nodeType":"ExpressionStatement","src":"1553:29:0"},{"expression":{"argumentTypes":null,"id":98,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":96,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":23,"src":"1592:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":97,"name":"_token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":75,"src":"1600:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"src":"1592:14:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"id":99,"nodeType":"ExpressionStatement","src":"1592:14:0"},{"expression":{"argumentTypes":null,"id":102,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":100,"name":"principalRequested","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":25,"src":"1616:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":101,"name":"_principalRequested","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":77,"src":"1637:19:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1616:40:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":103,"nodeType":"ExpressionStatement","src":"1616:40:0"},{"expression":{"argumentTypes":null,"id":106,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":104,"name":"loanMetadataUrl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":29,"src":"1666:15:0","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":105,"name":"_loanMetadataUrl","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":83,"src":"1684:16:0","typeDescriptions":{"typeIdentifier":"t_string_calldata_ptr","typeString":"string calldata"}},"src":"1666:34:0","typeDescriptions":{"typeIdentifier":"t_string_storage","typeString":"string storage ref"}},"id":107,"nodeType":"ExpressionStatement","src":"1666:34:0"},{"expression":{"argumentTypes":null,"id":110,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":108,"name":"repaymentCap","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":27,"src":"1710:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":109,"name":"_repaymentCap","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":79,"src":"1725:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1710:28:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":111,"nodeType":"ExpressionStatement","src":"1710:28:0"}]},"documentation":null,"id":113,"implemented":true,"kind":"function","modifiers":[{"arguments":null,"id":86,"modifierName":{"argumentTypes":null,"id":85,"name":"initializer","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":2609,"src":"1501:11:0","typeDescriptions":{"typeIdentifier":"t_modifier$__$","typeString":"modifier ()"}},"nodeType":"ModifierInvocation","src":"1501:11:0"}],"name":"initialize","nodeType":"FunctionDefinition","parameters":{"id":84,"nodeType":"ParameterList","parameters":[{"constant":false,"id":73,"name":"_borrower","nodeType":"VariableDeclaration","scope":113,"src":"1308:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":72,"name":"address","nodeType":"ElementaryTypeName","src":"1308:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"value":null,"visibility":"internal"},{"constant":false,"id":75,"name":"_token","nodeType":"VariableDeclaration","scope":113,"src":"1335:13:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"},"typeName":{"contractScope":null,"id":74,"name":"IERC20","nodeType":"UserDefinedTypeName","referencedDeclaration":2123,"src":"1335:6:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"value":null,"visibility":"internal"},{"constant":false,"id":77,"name":"_principalRequested","nodeType":"VariableDeclaration","scope":113,"src":"1358:27:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":76,"name":"uint256","nodeType":"ElementaryTypeName","src":"1358:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":79,"name":"_repaymentCap","nodeType":"VariableDeclaration","scope":113,"src":"1395:21:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":78,"name":"uint256","nodeType":"ElementaryTypeName","src":"1395:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":81,"name":"_duration","nodeType":"VariableDeclaration","scope":113,"src":"1426:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":80,"name":"uint256","nodeType":"ElementaryTypeName","src":"1426:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"},{"constant":false,"id":83,"name":"_loanMetadataUrl","nodeType":"VariableDeclaration","scope":113,"src":"1453:32:0","stateVariable":false,"storageLocation":"calldata","typeDescriptions":{"typeIdentifier":"t_string_calldata_ptr","typeString":"string"},"typeName":{"id":82,"name":"string","nodeType":"ElementaryTypeName","src":"1453:6:0","typeDescriptions":{"typeIdentifier":"t_string_storage_ptr","typeString":"string"}},"value":null,"visibility":"internal"}],"src":"1298:193:0"},"returnParameters":{"id":87,"nodeType":"ParameterList","parameters":[],"src":"1513:0:0"},"scope":438,"src":"1279:466:0","stateMutability":"nonpayable","superFunction":null,"visibility":"external"},{"body":{"id":175,"nodeType":"Block","src":"1902:541:0","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":118,"name":"_onlyAfterCrowdfundStart","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":411,"src":"1912:24:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1912:26:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"1912:26:0"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"_onlyBeforeCrowdfundEnd","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":422,"src":"1948:23:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1948:25:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"ExpressionStatement","src":"1948:25:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":127,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":125,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":115,"src":"1992:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":126,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2001:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"1992:10:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"46756e6420616d6f756e742063616e6e6f74206265207a65726f","id":128,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2004:28:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_b1e3c67d65b0525fcb73e3924022ce212e8440469e25503e8bfa231ecebd527b","typeString":"literal_string \"Fund amount cannot be zero\""},"value":"Fund amount cannot be zero"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_b1e3c67d65b0525fcb73e3924022ce212e8440469e25503e8bfa231ecebd527b","typeString":"literal_string \"Fund amount cannot be zero\""}],"id":124,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"1984:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":129,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"1984:49:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":130,"nodeType":"ExpressionStatement","src":"1984:49:0"},{"expression":{"argumentTypes":null,"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":131,"name":"totalContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"2044:16:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":134,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":115,"src":"2084:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":132,"name":"totalContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"2063:16:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":133,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":1285,"src":"2063:20:0","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":135,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2063:28:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2044:47:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":137,"nodeType":"ExpressionStatement","src":"2044:47:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":141,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":139,"name":"totalContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"2122:16:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":140,"name":"principalRequested","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":25,"src":"2142:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2122:38:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"596f757220636f6e747269627574696f6e20776f756c64206578636565642074686520746f74616c20616d6f756e74207265717565737465642e","id":142,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2174:60:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_66ada300544ddd45fb4e2f026c309474910a955135c2e974f502dd3283c0910e","typeString":"literal_string \"Your contribution would exceed the total amount requested.\""},"value":"Your contribution would exceed the total amount requested."}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_66ada300544ddd45fb4e2f026c309474910a955135c2e974f502dd3283c0910e","typeString":"literal_string \"Your contribution would exceed the total amount requested.\""}],"id":138,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"2101:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":143,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2101:143:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":144,"nodeType":"ExpressionStatement","src":"2101:143:0"},{"expression":{"argumentTypes":null,"id":156,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":145,"name":"amountContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"2255:17:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":148,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":146,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"2273:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":147,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2273:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"2255:29:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":154,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":115,"src":"2321:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":149,"name":"amountContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"2287:17:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":152,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":150,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"2305:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":151,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2305:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"2287:29:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":153,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":1285,"src":"2287:33:0","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":155,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2287:41:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2255:73:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":157,"nodeType":"ExpressionStatement","src":"2255:73:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":161,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"2362:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":162,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2362:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":164,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"2382:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_Crowdloan_$438","typeString":"contract Crowdloan"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Crowdloan_$438","typeString":"contract Crowdloan"}],"id":163,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2374:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":165,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2374:13:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":166,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":115,"src":"2389:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":158,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":23,"src":"2339:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"id":160,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"safeTransferFrom","nodeType":"MemberAccess","referencedDeclaration":2181,"src":"2339:22:0","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_contract$_IERC20_$2123_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2123_$","typeString":"function (contract IERC20,address,address,uint256)"}},"id":167,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2339:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":168,"nodeType":"ExpressionStatement","src":"2339:57:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":170,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"2417:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":171,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"2417:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"id":172,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":115,"src":"2429:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":169,"name":"Fund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":51,"src":"2412:4:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":173,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2412:24:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":174,"nodeType":"EmitStatement","src":"2407:29:0"}]},"documentation":"@dev During the crowdfund, anyone can fund and get repayment rights in proportion to their contribution","id":176,"implemented":true,"kind":"function","modifiers":[],"name":"fund","nodeType":"FunctionDefinition","parameters":{"id":116,"nodeType":"ParameterList","parameters":[{"constant":false,"id":115,"name":"amount","nodeType":"VariableDeclaration","scope":176,"src":"1877:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":114,"name":"uint256","nodeType":"ElementaryTypeName","src":"1877:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"1876:16:0"},"returnParameters":{"id":117,"nodeType":"ParameterList","parameters":[],"src":"1902:0:0"},"scope":438,"src":"1863:580:0","stateMutability":"nonpayable","superFunction":null,"visibility":"external"},{"body":{"id":239,"nodeType":"Block","src":"2751:589:0","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":181,"name":"_onlyBorrower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":389,"src":"2761:13:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":182,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2761:15:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":183,"nodeType":"ExpressionStatement","src":"2761:15:0"},{"assignments":[185],"declarations":[{"constant":false,"id":185,"name":"tokenBalance","nodeType":"VariableDeclaration","scope":239,"src":"2813:20:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":184,"name":"uint256","nodeType":"ElementaryTypeName","src":"2813:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":192,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":189,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"2860:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_Crowdloan_$438","typeString":"contract Crowdloan"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Crowdloan_$438","typeString":"contract Crowdloan"}],"id":188,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"2852:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":190,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2852:13:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"argumentTypes":null,"id":186,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":23,"src":"2836:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"id":187,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"balanceOf","nodeType":"MemberAccess","referencedDeclaration":2097,"src":"2836:15:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$_t_address_$returns$_t_uint256_$","typeString":"function (address) view external returns (uint256)"}},"id":191,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2836:30:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"2813:53:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":196,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":194,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":178,"src":"2885:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":195,"name":"tokenBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":185,"src":"2895:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"2885:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"496e737566666963656e7420746f6b656e7320746f207769746864726177","id":197,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"2909:32:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_7d38d994892ddb39b50ae3808642cb5d987c8541681e8dbf5d629d68347c9ab5","typeString":"literal_string \"Insufficent tokens to withdraw\""},"value":"Insufficent tokens to withdraw"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_7d38d994892ddb39b50ae3808642cb5d987c8541681e8dbf5d629d68347c9ab5","typeString":"literal_string \"Insufficent tokens to withdraw\""}],"id":193,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"2877:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":198,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2877:65:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":199,"nodeType":"ExpressionStatement","src":"2877:65:0"},{"condition":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":202,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":200,"name":"amountRepaid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"2957:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":201,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"2972:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"2957:16:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":null,"id":217,"nodeType":"IfStatement","src":"2953:218:0","trueBody":{"id":216,"nodeType":"Block","src":"2975:196:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":212,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":206,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":178,"src":"3031:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":204,"name":"tokenBalance","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":185,"src":"3014:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":205,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":1261,"src":"3014:16:0","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":207,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3014:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":210,"name":"totalRepaymentWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"3059:23:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":208,"name":"amountRepaid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"3042:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":209,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":1261,"src":"3042:16:0","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":211,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3042:41:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3014:69:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"5769746864726177616c2077696c6c206c65616420746f2072657061796d656e7420696e62616c616e6365","id":213,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"3101:45:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_fa1915df29b169ed1a5f9522c9f55521d0c25fd9b90c377c63c4685bf4f246c9","typeString":"literal_string \"Withdrawal will lead to repayment inbalance\""},"value":"Withdrawal will lead to repayment inbalance"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_fa1915df29b169ed1a5f9522c9f55521d0c25fd9b90c377c63c4685bf4f246c9","typeString":"literal_string \"Withdrawal will lead to repayment inbalance\""}],"id":203,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"2989:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":214,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"2989:171:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":215,"nodeType":"ExpressionStatement","src":"2989:171:0"}]}},{"expression":{"argumentTypes":null,"id":223,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":218,"name":"principalWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":37,"src":"3181:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":221,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":178,"src":"3225:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":219,"name":"principalWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":37,"src":"3202:18:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":220,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":1285,"src":"3202:22:0","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":222,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3202:30:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3181:51:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":224,"nodeType":"ExpressionStatement","src":"3181:51:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":228,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"3261:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":229,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3261:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"id":230,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":178,"src":"3273:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":225,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":23,"src":"3242:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"id":227,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"safeTransfer","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"3242:18:0","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_contract$_IERC20_$2123_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2123_$","typeString":"function (contract IERC20,address,uint256)"}},"id":231,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3242:38:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":232,"nodeType":"ExpressionStatement","src":"3242:38:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":234,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"3314:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":235,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3314:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"id":236,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":178,"src":"3326:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":233,"name":"WithdrawPrincipal","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":57,"src":"3296:17:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":237,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3296:37:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":238,"nodeType":"EmitStatement","src":"3291:42:0"}]},"documentation":"@dev Borrower can withdraw currently aquired principal in any proportion, and any time during the crowdfund for flexibility.\n This DOES NOT affect the total principal that can be raised or the loan terms, it merely provides cash flow.","id":240,"implemented":true,"kind":"function","modifiers":[],"name":"withdrawPrincipal","nodeType":"FunctionDefinition","parameters":{"id":179,"nodeType":"ParameterList","parameters":[{"constant":false,"id":178,"name":"amount","nodeType":"VariableDeclaration","scope":240,"src":"2726:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":177,"name":"uint256","nodeType":"ElementaryTypeName","src":"2726:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"2725:16:0"},"returnParameters":{"id":180,"nodeType":"ParameterList","parameters":[],"src":"2751:0:0"},"scope":438,"src":"2699:641:0","stateMutability":"nonpayable","superFunction":null,"visibility":"external"},{"body":{"id":287,"nodeType":"Block","src":"3452:344:0","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":245,"name":"_onlyAfterCrowdfundEnd","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":437,"src":"3462:22:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":246,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3462:24:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":247,"nodeType":"ExpressionStatement","src":"3462:24:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":251,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":249,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":242,"src":"3505:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":250,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"3514:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"3505:10:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"52657061796d656e7420616d6f756e742063616e6e6f74206265207a65726f","id":252,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"3517:33:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_1da63e2bdf9820e20b6339f1da391f2d6305b6d77703558717bfb2cfce15f570","typeString":"literal_string \"Repayment amount cannot be zero\""},"value":"Repayment amount cannot be zero"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_1da63e2bdf9820e20b6339f1da391f2d6305b6d77703558717bfb2cfce15f570","typeString":"literal_string \"Repayment amount cannot be zero\""}],"id":248,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"3497:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":253,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3497:54:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":254,"nodeType":"ExpressionStatement","src":"3497:54:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":261,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":258,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":242,"src":"3586:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":256,"name":"amountRepaid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"3569:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":257,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":1285,"src":"3569:16:0","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":259,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3569:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":260,"name":"repaymentCap","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":27,"src":"3597:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3569:40:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"4d757374206e6f74206578636565642072657061796d656e7420636170","id":262,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"3611:31:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_6d1e689c66b55ca384b8a9c88ea04c98249579c14434f010a6fc77ccc9c03386","typeString":"literal_string \"Must not exceed repayment cap\""},"value":"Must not exceed repayment cap"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_6d1e689c66b55ca384b8a9c88ea04c98249579c14434f010a6fc77ccc9c03386","typeString":"literal_string \"Must not exceed repayment cap\""}],"id":255,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"3561:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":263,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3561:82:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":264,"nodeType":"ExpressionStatement","src":"3561:82:0"},{"expression":{"argumentTypes":null,"id":270,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":265,"name":"amountRepaid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"3654:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":268,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":242,"src":"3686:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":266,"name":"amountRepaid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"3669:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":267,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":1285,"src":"3669:16:0","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":269,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3669:24:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"3654:39:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":271,"nodeType":"ExpressionStatement","src":"3654:39:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":275,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"3726:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":276,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"3726:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":278,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3732,"src":"3746:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_Crowdloan_$438","typeString":"contract Crowdloan"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_Crowdloan_$438","typeString":"contract Crowdloan"}],"id":277,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"3738:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":"address"},"id":279,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3738:13:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},{"argumentTypes":null,"id":280,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":242,"src":"3753:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_address","typeString":"address"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":272,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":23,"src":"3703:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"id":274,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"safeTransferFrom","nodeType":"MemberAccess","referencedDeclaration":2181,"src":"3703:22:0","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_contract$_IERC20_$2123_$_t_address_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2123_$","typeString":"function (contract IERC20,address,address,uint256)"}},"id":281,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3703:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":282,"nodeType":"ExpressionStatement","src":"3703:57:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":284,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":242,"src":"3782:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":283,"name":"Repay","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":67,"src":"3776:5:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":285,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3776:13:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":286,"nodeType":"EmitStatement","src":"3771:18:0"}]},"documentation":"@dev Anyone can make repayments on behalf of the borrower","id":288,"implemented":true,"kind":"function","modifiers":[],"name":"repay","nodeType":"FunctionDefinition","parameters":{"id":243,"nodeType":"ParameterList","parameters":[{"constant":false,"id":242,"name":"amount","nodeType":"VariableDeclaration","scope":288,"src":"3427:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":241,"name":"uint256","nodeType":"ElementaryTypeName","src":"3427:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"src":"3426:16:0"},"returnParameters":{"id":244,"nodeType":"ParameterList","parameters":[],"src":"3452:0:0"},"scope":438,"src":"3412:384:0","stateMutability":"nonpayable","superFunction":null,"visibility":"external"},{"body":{"id":352,"nodeType":"Block","src":"3940:504:0","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":291,"name":"_onlyAfterCrowdfundEnd","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":437,"src":"3950:22:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":292,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"3950:24:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":293,"nodeType":"ExpressionStatement","src":"3950:24:0"},{"assignments":[295],"declarations":[{"constant":false,"id":295,"name":"totalOwed","nodeType":"VariableDeclaration","scope":352,"src":"3985:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":294,"name":"uint256","nodeType":"ElementaryTypeName","src":"3985:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":306,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":304,"name":"totalContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"4057:16:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":298,"name":"amountContributed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"4022:17:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":301,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":299,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"4040:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":300,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4040:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4022:29:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":296,"name":"amountRepaid","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":39,"src":"4005:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":297,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"mul","nodeType":"MemberAccess","referencedDeclaration":1213,"src":"4005:16:0","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":302,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4005:47:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":303,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"div","nodeType":"MemberAccess","referencedDeclaration":1237,"src":"4005:51:0","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":305,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4005:69:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"3985:89:0"},{"assignments":[308],"declarations":[{"constant":false,"id":308,"name":"amount","nodeType":"VariableDeclaration","scope":352,"src":"4084:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":307,"name":"uint256","nodeType":"ElementaryTypeName","src":"4084:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"value":null,"visibility":"internal"}],"id":316,"initialValue":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":311,"name":"repaymentWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":43,"src":"4115:18:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":314,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":312,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"4134:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":313,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4134:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"4115:30:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":309,"name":"totalOwed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":295,"src":"4101:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":310,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sub","nodeType":"MemberAccess","referencedDeclaration":1261,"src":"4101:13:0","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":315,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4101:45:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"4084:62:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":320,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":318,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":308,"src":"4164:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"hexValue":"30","id":319,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4173:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4164:10:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"5769746864726177616c20616d6f756e742063616e6e6f74206265207a65726f","id":321,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"4176:34:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_4198be0d164ee05c141371336ea9903a0d3db176faf5f127839cd0bdeee771e0","typeString":"literal_string \"Withdrawal amount cannot be zero\""},"value":"Withdrawal amount cannot be zero"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_4198be0d164ee05c141371336ea9903a0d3db176faf5f127839cd0bdeee771e0","typeString":"literal_string \"Withdrawal amount cannot be zero\""}],"id":317,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"4156:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":322,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4156:55:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":323,"nodeType":"ExpressionStatement","src":"4156:55:0"},{"expression":{"argumentTypes":null,"id":329,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"baseExpression":{"argumentTypes":null,"id":324,"name":"repaymentWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":43,"src":"4222:18:0","typeDescriptions":{"typeIdentifier":"t_mapping$_t_address_$_t_uint256_$","typeString":"mapping(address => uint256)"}},"id":327,"indexExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":325,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"4241:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":326,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4241:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"4222:30:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":328,"name":"totalOwed","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":295,"src":"4255:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4222:42:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":330,"nodeType":"ExpressionStatement","src":"4222:42:0"},{"expression":{"argumentTypes":null,"id":336,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":331,"name":"totalRepaymentWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"4274:23:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":334,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":308,"src":"4328:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":332,"name":"totalRepaymentWithdrawn","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"4300:23:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":333,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"add","nodeType":"MemberAccess","referencedDeclaration":1285,"src":"4300:27:0","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":335,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4300:35:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4274:61:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":337,"nodeType":"ExpressionStatement","src":"4274:61:0"},{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":341,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"4365:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":342,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4365:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"id":343,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":308,"src":"4377:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"argumentTypes":null,"id":338,"name":"token","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":23,"src":"4346:5:0","typeDescriptions":{"typeIdentifier":"t_contract$_IERC20_$2123","typeString":"contract IERC20"}},"id":340,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"safeTransfer","nodeType":"MemberAccess","referencedDeclaration":2156,"src":"4346:18:0","typeDescriptions":{"typeIdentifier":"t_function_internal_nonpayable$_t_contract$_IERC20_$2123_$_t_address_$_t_uint256_$returns$__$bound_to$_t_contract$_IERC20_$2123_$","typeString":"function (contract IERC20,address,uint256)"}},"id":344,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4346:38:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":345,"nodeType":"ExpressionStatement","src":"4346:38:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"expression":{"argumentTypes":null,"id":347,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"4418:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":348,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4418:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},{"argumentTypes":null,"id":349,"name":"amount","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":308,"src":"4430:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_address_payable","typeString":"address payable"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":346,"name":"WithdrawRepayment","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":63,"src":"4400:17:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_address_$_t_uint256_$returns$__$","typeString":"function (address,uint256)"}},"id":350,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4400:37:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":351,"nodeType":"EmitStatement","src":"4395:42:0"}]},"documentation":"@dev Lenders can withdraw their proportional stake from repayments after the crowdfund ends","id":353,"implemented":true,"kind":"function","modifiers":[],"name":"withdrawRepayment","nodeType":"FunctionDefinition","parameters":{"id":289,"nodeType":"ParameterList","parameters":[],"src":"3928:2:0"},"returnParameters":{"id":290,"nodeType":"ParameterList","parameters":[],"src":"3940:0:0"},"scope":438,"src":"3902:542:0","stateMutability":"nonpayable","superFunction":null,"visibility":"external"},{"body":{"id":376,"nodeType":"Block","src":"4536:183:0","statements":[{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":356,"name":"_onlyBorrower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":389,"src":"4546:13:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":357,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4546:15:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":358,"nodeType":"ExpressionStatement","src":"4546:15:0"},{"expression":{"argumentTypes":null,"arguments":[],"expression":{"argumentTypes":[],"id":359,"name":"_onlyBeforeCrowdfundStart","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":400,"src":"4571:25:0","typeDescriptions":{"typeIdentifier":"t_function_internal_view$__$returns$__$","typeString":"function () view"}},"id":360,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4571:27:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":361,"nodeType":"ExpressionStatement","src":"4571:27:0"},{"expression":{"argumentTypes":null,"id":364,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":362,"name":"crowdfundStart","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"4609:14:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"id":363,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3710,"src":"4626:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4609:20:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":365,"nodeType":"ExpressionStatement","src":"4609:20:0"},{"expression":{"argumentTypes":null,"id":370,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"argumentTypes":null,"id":366,"name":"crowdfundEnd","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"4639:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":369,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":367,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3710,"src":"4654:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"argumentTypes":null,"id":368,"name":"crowdfundDuration","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":19,"src":"4660:17:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4654:23:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"4639:38:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":371,"nodeType":"ExpressionStatement","src":"4639:38:0"},{"eventCall":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"id":373,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3710,"src":"4708:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":372,"name":"StartCrowdfund","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":71,"src":"4693:14:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$_t_uint256_$returns$__$","typeString":"function (uint256)"}},"id":374,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4693:19:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":375,"nodeType":"EmitStatement","src":"4688:24:0"}]},"documentation":"@dev Borrower can start the crowdfund once","id":377,"implemented":true,"kind":"function","modifiers":[],"name":"startCrowdfund","nodeType":"FunctionDefinition","parameters":{"id":354,"nodeType":"ParameterList","parameters":[],"src":"4524:2:0"},"returnParameters":{"id":355,"nodeType":"ParameterList","parameters":[],"src":"4536:0:0"},"scope":438,"src":"4501:218:0","stateMutability":"nonpayable","superFunction":null,"visibility":"external"},{"body":{"id":388,"nodeType":"Block","src":"4764:88:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":384,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"expression":{"argumentTypes":null,"id":381,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3708,"src":"4782:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":382,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberName":"sender","nodeType":"MemberAccess","referencedDeclaration":null,"src":"4782:10:0","typeDescriptions":{"typeIdentifier":"t_address_payable","typeString":"address payable"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"id":383,"name":"borrower","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":21,"src":"4796:8:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"4782:22:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"4f6e6c792074686520626f72726f7765722063616e2063616c6c2066756e6374696f6e2e","id":385,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"4806:38:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_6a5491e488795a6378e19ac3cea8c201f6df33d2998d18a166748b5b327a6836","typeString":"literal_string \"Only the borrower can call function.\""},"value":"Only the borrower can call function."}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_6a5491e488795a6378e19ac3cea8c201f6df33d2998d18a166748b5b327a6836","typeString":"literal_string \"Only the borrower can call function.\""}],"id":380,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"4774:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":386,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4774:71:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":387,"nodeType":"ExpressionStatement","src":"4774:71:0"}]},"documentation":null,"id":389,"implemented":true,"kind":"function","modifiers":[],"name":"_onlyBorrower","nodeType":"FunctionDefinition","parameters":{"id":378,"nodeType":"ParameterList","parameters":[],"src":"4747:2:0"},"returnParameters":{"id":379,"nodeType":"ParameterList","parameters":[],"src":"4764:0:0"},"scope":438,"src":"4725:127:0","stateMutability":"view","superFunction":null,"visibility":"internal"},{"body":{"id":399,"nodeType":"Block","src":"4909:76:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":395,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":393,"name":"crowdfundStart","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"4927:14:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"argumentTypes":null,"hexValue":"30","id":394,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"4945:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"4927:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"4f6e6c79206265666f72652063726f776466756e64207374617274","id":396,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"4948:29:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_2b2663b3f0af6237f934dd3f53aa07d81368b045dd4f0c93b96221c861998d3e","typeString":"literal_string \"Only before crowdfund start\""},"value":"Only before crowdfund start"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_2b2663b3f0af6237f934dd3f53aa07d81368b045dd4f0c93b96221c861998d3e","typeString":"literal_string \"Only before crowdfund start\""}],"id":392,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"4919:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":397,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"4919:59:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":398,"nodeType":"ExpressionStatement","src":"4919:59:0"}]},"documentation":null,"id":400,"implemented":true,"kind":"function","modifiers":[],"name":"_onlyBeforeCrowdfundStart","nodeType":"FunctionDefinition","parameters":{"id":390,"nodeType":"ParameterList","parameters":[],"src":"4892:2:0"},"returnParameters":{"id":391,"nodeType":"ParameterList","parameters":[],"src":"4909:0:0"},"scope":438,"src":"4858:127:0","stateMutability":"view","superFunction":null,"visibility":"internal"},{"body":{"id":410,"nodeType":"Block","src":"5041:75:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":406,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":404,"name":"crowdfundStart","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"5059:14:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":405,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5077:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5059:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"4f6e6c792061667465722063726f776466756e64207374617274","id":407,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"5080:28:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_66da05e77c710cf560415b61ca792d7f872539b0668f5805eed221b41aed0a76","typeString":"literal_string \"Only after crowdfund start\""},"value":"Only after crowdfund start"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_66da05e77c710cf560415b61ca792d7f872539b0668f5805eed221b41aed0a76","typeString":"literal_string \"Only after crowdfund start\""}],"id":403,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"5051:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":408,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5051:58:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":409,"nodeType":"ExpressionStatement","src":"5051:58:0"}]},"documentation":null,"id":411,"implemented":true,"kind":"function","modifiers":[],"name":"_onlyAfterCrowdfundStart","nodeType":"FunctionDefinition","parameters":{"id":401,"nodeType":"ParameterList","parameters":[],"src":"5024:2:0"},"returnParameters":{"id":402,"nodeType":"ParameterList","parameters":[],"src":"5041:0:0"},"scope":438,"src":"4991:125:0","stateMutability":"view","superFunction":null,"visibility":"internal"},{"body":{"id":421,"nodeType":"Block","src":"5171:74:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":417,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":415,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3710,"src":"5189:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"argumentTypes":null,"id":416,"name":"crowdfundEnd","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"5196:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5189:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"4f6e6c79206265666f72652063726f776466756e6420656e64","id":418,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"5210:27:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_03316990444351eea031ceba4835607127eefa409711fa78c2675f2e92784f15","typeString":"literal_string \"Only before crowdfund end\""},"value":"Only before crowdfund end"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_03316990444351eea031ceba4835607127eefa409711fa78c2675f2e92784f15","typeString":"literal_string \"Only before crowdfund end\""}],"id":414,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"5181:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":419,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5181:57:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":420,"nodeType":"ExpressionStatement","src":"5181:57:0"}]},"documentation":null,"id":422,"implemented":true,"kind":"function","modifiers":[],"name":"_onlyBeforeCrowdfundEnd","nodeType":"FunctionDefinition","parameters":{"id":412,"nodeType":"ParameterList","parameters":[],"src":"5154:2:0"},"returnParameters":{"id":413,"nodeType":"ParameterList","parameters":[],"src":"5171:0:0"},"scope":438,"src":"5122:123:0","stateMutability":"view","superFunction":null,"visibility":"internal"},{"body":{"id":436,"nodeType":"Block","src":"5299:96:0","statements":[{"expression":{"argumentTypes":null,"arguments":[{"argumentTypes":null,"commonType":{"typeIdentifier":"t_bool","typeString":"bool"},"id":432,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":428,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":426,"name":"crowdfundStart","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"5317:14:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"!=","rightExpression":{"argumentTypes":null,"hexValue":"30","id":427,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"5335:1:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"src":"5317:19:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"BinaryOperation","operator":"&&","rightExpression":{"argumentTypes":null,"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":431,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"argumentTypes":null,"id":429,"name":"now","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3710,"src":"5340:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"argumentTypes":null,"id":430,"name":"crowdfundEnd","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":17,"src":"5346:12:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"5340:18:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"5317:41:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},{"argumentTypes":null,"hexValue":"4f6e6c792061667465722063726f776466756e6420656e642e","id":433,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"5360:27:0","subdenomination":null,"typeDescriptions":{"typeIdentifier":"t_stringliteral_ea04bd6d1f57b5ab3b392673bcd33b5dabe2926a60f7686fd988492dc26c1681","typeString":"literal_string \"Only after crowdfund end.\""},"value":"Only after crowdfund end."}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"},{"typeIdentifier":"t_stringliteral_ea04bd6d1f57b5ab3b392673bcd33b5dabe2926a60f7686fd988492dc26c1681","typeString":"literal_string \"Only after crowdfund end.\""}],"id":425,"name":"require","nodeType":"Identifier","overloadedDeclarations":[3711,3712],"referencedDeclaration":3712,"src":"5309:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$_t_string_memory_ptr_$returns$__$","typeString":"function (bool,string memory) pure"}},"id":434,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"names":[],"nodeType":"FunctionCall","src":"5309:79:0","typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":435,"nodeType":"ExpressionStatement","src":"5309:79:0"}]},"documentation":null,"id":437,"implemented":true,"kind":"function","modifiers":[],"name":"_onlyAfterCrowdfundEnd","nodeType":"FunctionDefinition","parameters":{"id":423,"nodeType":"ParameterList","parameters":[],"src":"5282:2:0"},"returnParameters":{"id":424,"nodeType":"ParameterList","parameters":[],"src":"5299:0:0"},"scope":438,"src":"5251:144:0","stateMutability":"view","superFunction":null,"visibility":"internal"}],"scope":439,"src":"250:5147:0"}],"src":"0:5398:0"},"bytecode":"0x60806040523480156100115760006000fd5b50610017565b611b85806100266000396000f3fe60806040523480156100115760006000fd5b50600436106101315760003560e01c80638c3f0e5d116100ae578063ca1d209d11610072578063ca1d209d14610454578063d2e3966014610483578063dad8671b146104a1578063ee86afd814610525578063fc0c546a1461054357610131565b80638c3f0e5d146103135780638ffc9215146103315780639a593b9a1461034f578063b90a762a14610359578063c95cbe741461043657610131565b8063658e28a4116100f5578063658e28a4146102195780637489b451146102485780637dd99395146102525780637df1f1b9146102ab578063859e0015146102f557610131565b8063023f4147146101375780630dbd9376146101555780632c52af3d1461017357806336aec5a314610191578063371fd8e6146101ea57610131565b60006000fd5b61013f61058d565b6040518082815260200191505060405180910390f35b61015d610596565b6040518082815260200191505060405180910390f35b61017b61059f565b6040518082815260200191505060405180910390f35b6101d4600480360360208110156101a85760006000fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105a8565b6040518082815260200191505060405180910390f35b610217600480360360208110156102015760006000fd5b81019080803590602001909291905050506105c3565b005b610246600480360360208110156102305760006000fd5b8101908080359060200190929190505050610790565b005b610250610a72565b005b610295600480360360208110156102695760006000fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cfb565b6040518082815260200191505060405180910390f35b6102b3610d16565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102fd610d3c565b6040518082815260200191505060405180910390f35b61031b610d45565b6040518082815260200191505060405180910390f35b610339610d4e565b6040518082815260200191505060405180910390f35b610357610d57565b005b610434600480360360c08110156103705760006000fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803590602001906401000000008111156103ec5760006000fd5b8201836020820111156103ff5760006000fd5b803590602001918460018302840111640100000000831117156104225760006000fd5b90919293909091929390505050610dcc565b005b61043e610f9b565b6040518082815260200191505060405180910390f35b6104816004803603602081101561046b5760006000fd5b8101908080359060200190929190505050610fa4565b005b61048b611224565b6040518082815260200191505060405180910390f35b6104a961122d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ea5780820151818401525b6020810190506104ce565b50505050905090810190601f1680156105175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61052d6112ce565b6040518082815260200191505060405180910390f35b61054b6112d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b603c6000505481565b60406000505481565b60396000505481565b603b6000506020528060005260406000206000915090505481565b6105d16112fd63ffffffff16565b60008111151561064c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f52657061796d656e7420616d6f756e742063616e6e6f74206265207a65726f0081526020015060200191505060405180910390fd5b60396000505461066a82603e6000505461139190919063ffffffff16565b111515156106e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4d757374206e6f74206578636565642072657061796d656e742063617000000081526020015060200191505060405180910390fd5b6106fb81603e6000505461139190919063ffffffff16565b603e600050819090905550610755333083603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113ba909392919063ffffffff16565b7fa6ffc78a660e4971a47a0f916a0abae483804e6f42c9292ed06aa64f8fe46230816040518082815260200191505060405180910390a15b50565b61079e6114c763ffffffff16565b6000603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156108405760006000fd5b505afa158015610855573d600060003e3d6000fd5b505050506040513d602081101561086c5760006000fd5b810190808051906020019092919050505090508082111515156108fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f496e737566666963656e7420746f6b656e7320746f207769746864726177000081526020015060200191505060405180910390fd5b6000603e60005054111561099257610925604060005054603e6000505461157290919063ffffffff16565b610938838361157290919063ffffffff16565b10151515610991576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611b26602b913960400191505060405180910390fd5b5b6109aa82603d6000505461139190919063ffffffff16565b603d600050819090905550610a023383603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661159b9092919063ffffffff16565b7fee1b5abe14e43ee34008f06f51efca5382c42fb48b0a040fd7a5f5c630cb55803383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505b50565b610a806112fd63ffffffff16565b6000610af6603c60005054610ae8603b60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054603e6000505461167390919063ffffffff16565b6116b890919063ffffffff16565b90506000610b52603f60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050548361157290919063ffffffff16565b9050600081111515610bcf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5769746864726177616c20616d6f756e742063616e6e6f74206265207a65726f81526020015060200191505060405180910390fd5b81603f60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819090905550610c338160406000505461139190919063ffffffff16565b6040600050819090905550610c8b3382603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661159b9092919063ffffffff16565b7f99a5f076bd438fcb3b84841caf48b7c7f0033ba32847d8b8d34ba0d65a369b593382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505b565b603f6000506020528060005260406000206000915090505481565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60346000505481565b60336000505481565b60386000505481565b610d656114c763ffffffff16565b610d736116ea63ffffffff16565b426033600050819090905550603560005054420160346000508190909055507f7cbc4c855be831448c84ab8db17649938de7e94a1a1dc9b803e6c07acc3cb03b426040518082815260200191505060405180910390a15b565b600060019054906101000a900460ff1680610df15750610df061176d63ffffffff16565b5b80610e095750600060009054906101000a900460ff16155b1515610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611af8602e913960400191505060405180910390fd5b6000600060019054906101000a900460ff161590508015610eb2576001600060016101000a81548160ff0219169083151502179055506001600060006101000a81548160ff0219169083151502179055505b87603660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083603560005081909090555086603760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560386000508190909055508282603a6000509190610f609291906119e9565b508460396000508190909055505b8015610f90576000600060016101000a81548160ff0219169083151502179055505b505b50505050505050565b603d6000505481565b610fb261178563ffffffff16565b610fc061180963ffffffff16565b60008111151561103b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f46756e6420616d6f756e742063616e6e6f74206265207a65726f00000000000081526020015060200191505060405180910390fd5b61105381603c6000505461139190919063ffffffff16565b603c600050819090905550603860005054603c60005054111515156110c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611a9a603a913960400191505060405180910390fd5b61111b81603b60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505461139190919063ffffffff16565b603b60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000508190909055506111b5333083603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113ba909392919063ffffffff16565b7fda8220a878ff7a89474ccffdaa31ea1ed1ffbb0207d5051afccc4fbaf81f9bcd3382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b50565b60356000505481565b603a6000508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112c65780601f1061129b576101008083540402835291602001916112c6565b820191906000526020600020905b8154815290600101906020018083116112a957829003601f168201915b505050505081565b603e6000505481565b603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060336000505414158015611317575060346000505442115b151561138e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4f6e6c792061667465722063726f776466756e6420656e642e0000000000000081526020015060200191505060405180910390fd5b5b565b6000600082840190508381101515156113aa5760006000fd5b809150506113b456505b92915050565b6114c0848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061188c63ffffffff16565b5b50505050565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561156f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611ad46024913960400191505060405180910390fd5b5b565b60008282111515156115845760006000fd5b600082840390508091505061159556505b92915050565b61166d838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061188c63ffffffff16565b5b505050565b6000600083141561168757600090506116b2565b6000828402905082848281151561169a57fe5b041415156116a85760006000fd5b809150506116b256505b92915050565b60006000821115156116ca5760006000fd5b600082848115156116d757fe5b049050809150506116e456505b92915050565b600060336000505414151561176a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4f6e6c79206265666f72652063726f776466756e64207374617274000000000081526020015060200191505060405180910390fd5b5b565b60006000303b90506000811491505061178256505b90565b600060336000505414151515611806576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4f6e6c792061667465722063726f776466756e6420737461727400000000000081526020015060200191505060405180910390fd5b5b565b6034600050544211151515611889576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4f6e6c79206265666f72652063726f776466756e6420656e640000000000000081526020015060200191505060405180910390fd5b5b565b6118b38273ffffffffffffffffffffffffffffffffffffffff166119cf909063ffffffff16565b15156118bf5760006000fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310151561191157805182525b6020820191506020810190506020830392506118eb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611973576040519150601f19603f3d011682016040523d82523d6000602084013e611978565b606091505b509150915081151561198a5760006000fd5b6000815111156119c8578080602001905160208110156119aa5760006000fd5b810190808051906020019092919050505015156119c75760006000fd5b5b50505b5050565b60006000823b9050600081119150506119e456505b919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a2a57803560ff1916838001178555611a5d565b82800160010185558215611a5d579182015b82811115611a5c5782358260005090905591602001919060010190611a3c565b5b509050611a6a9190611a6e565b5090565b611a969190611a78565b80821115611a925760008181506000905550600101611a78565b5090565b9056fe596f757220636f6e747269627574696f6e20776f756c64206578636565642074686520746f74616c20616d6f756e74207265717565737465642e4f6e6c792074686520626f72726f7765722063616e2063616c6c2066756e6374696f6e2e436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645769746864726177616c2077696c6c206c65616420746f2072657061796d656e7420696e62616c616e6365a265627a7a72315820e74bded1e4818bde30f7635ff047df951d8556a4cc8926888695b31fc10baec664736f6c634300050b0032","deployedBytecode":"0x60806040523480156100115760006000fd5b50600436106101315760003560e01c80638c3f0e5d116100ae578063ca1d209d11610072578063ca1d209d14610454578063d2e3966014610483578063dad8671b146104a1578063ee86afd814610525578063fc0c546a1461054357610131565b80638c3f0e5d146103135780638ffc9215146103315780639a593b9a1461034f578063b90a762a14610359578063c95cbe741461043657610131565b8063658e28a4116100f5578063658e28a4146102195780637489b451146102485780637dd99395146102525780637df1f1b9146102ab578063859e0015146102f557610131565b8063023f4147146101375780630dbd9376146101555780632c52af3d1461017357806336aec5a314610191578063371fd8e6146101ea57610131565b60006000fd5b61013f61058d565b6040518082815260200191505060405180910390f35b61015d610596565b6040518082815260200191505060405180910390f35b61017b61059f565b6040518082815260200191505060405180910390f35b6101d4600480360360208110156101a85760006000fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105a8565b6040518082815260200191505060405180910390f35b610217600480360360208110156102015760006000fd5b81019080803590602001909291905050506105c3565b005b610246600480360360208110156102305760006000fd5b8101908080359060200190929190505050610790565b005b610250610a72565b005b610295600480360360208110156102695760006000fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cfb565b6040518082815260200191505060405180910390f35b6102b3610d16565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102fd610d3c565b6040518082815260200191505060405180910390f35b61031b610d45565b6040518082815260200191505060405180910390f35b610339610d4e565b6040518082815260200191505060405180910390f35b610357610d57565b005b610434600480360360c08110156103705760006000fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803590602001906401000000008111156103ec5760006000fd5b8201836020820111156103ff5760006000fd5b803590602001918460018302840111640100000000831117156104225760006000fd5b90919293909091929390505050610dcc565b005b61043e610f9b565b6040518082815260200191505060405180910390f35b6104816004803603602081101561046b5760006000fd5b8101908080359060200190929190505050610fa4565b005b61048b611224565b6040518082815260200191505060405180910390f35b6104a961122d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104ea5780820151818401525b6020810190506104ce565b50505050905090810190601f1680156105175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61052d6112ce565b6040518082815260200191505060405180910390f35b61054b6112d7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b603c6000505481565b60406000505481565b60396000505481565b603b6000506020528060005260406000206000915090505481565b6105d16112fd63ffffffff16565b60008111151561064c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f52657061796d656e7420616d6f756e742063616e6e6f74206265207a65726f0081526020015060200191505060405180910390fd5b60396000505461066a82603e6000505461139190919063ffffffff16565b111515156106e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4d757374206e6f74206578636565642072657061796d656e742063617000000081526020015060200191505060405180910390fd5b6106fb81603e6000505461139190919063ffffffff16565b603e600050819090905550610755333083603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113ba909392919063ffffffff16565b7fa6ffc78a660e4971a47a0f916a0abae483804e6f42c9292ed06aa64f8fe46230816040518082815260200191505060405180910390a15b50565b61079e6114c763ffffffff16565b6000603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156108405760006000fd5b505afa158015610855573d600060003e3d6000fd5b505050506040513d602081101561086c5760006000fd5b810190808051906020019092919050505090508082111515156108fa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f496e737566666963656e7420746f6b656e7320746f207769746864726177000081526020015060200191505060405180910390fd5b6000603e60005054111561099257610925604060005054603e6000505461157290919063ffffffff16565b610938838361157290919063ffffffff16565b10151515610991576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180611b26602b913960400191505060405180910390fd5b5b6109aa82603d6000505461139190919063ffffffff16565b603d600050819090905550610a023383603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661159b9092919063ffffffff16565b7fee1b5abe14e43ee34008f06f51efca5382c42fb48b0a040fd7a5f5c630cb55803383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a1505b50565b610a806112fd63ffffffff16565b6000610af6603c60005054610ae8603b60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054603e6000505461167390919063ffffffff16565b6116b890919063ffffffff16565b90506000610b52603f60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050548361157290919063ffffffff16565b9050600081111515610bcf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5769746864726177616c20616d6f756e742063616e6e6f74206265207a65726f81526020015060200191505060405180910390fd5b81603f60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819090905550610c338160406000505461139190919063ffffffff16565b6040600050819090905550610c8b3382603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661159b9092919063ffffffff16565b7f99a5f076bd438fcb3b84841caf48b7c7f0033ba32847d8b8d34ba0d65a369b593382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505b565b603f6000506020528060005260406000206000915090505481565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60346000505481565b60336000505481565b60386000505481565b610d656114c763ffffffff16565b610d736116ea63ffffffff16565b426033600050819090905550603560005054420160346000508190909055507f7cbc4c855be831448c84ab8db17649938de7e94a1a1dc9b803e6c07acc3cb03b426040518082815260200191505060405180910390a15b565b600060019054906101000a900460ff1680610df15750610df061176d63ffffffff16565b5b80610e095750600060009054906101000a900460ff16155b1515610e60576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180611af8602e913960400191505060405180910390fd5b6000600060019054906101000a900460ff161590508015610eb2576001600060016101000a81548160ff0219169083151502179055506001600060006101000a81548160ff0219169083151502179055505b87603660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083603560005081909090555086603760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508560386000508190909055508282603a6000509190610f609291906119e9565b508460396000508190909055505b8015610f90576000600060016101000a81548160ff0219169083151502179055505b505b50505050505050565b603d6000505481565b610fb261178563ffffffff16565b610fc061180963ffffffff16565b60008111151561103b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f46756e6420616d6f756e742063616e6e6f74206265207a65726f00000000000081526020015060200191505060405180910390fd5b61105381603c6000505461139190919063ffffffff16565b603c600050819090905550603860005054603c60005054111515156110c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611a9a603a913960400191505060405180910390fd5b61111b81603b60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505461139190919063ffffffff16565b603b60005060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000508190909055506111b5333083603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113ba909392919063ffffffff16565b7fda8220a878ff7a89474ccffdaa31ea1ed1ffbb0207d5051afccc4fbaf81f9bcd3382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b50565b60356000505481565b603a6000508054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112c65780601f1061129b576101008083540402835291602001916112c6565b820191906000526020600020905b8154815290600101906020018083116112a957829003601f168201915b505050505081565b603e6000505481565b603760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060336000505414158015611317575060346000505442115b151561138e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4f6e6c792061667465722063726f776466756e6420656e642e0000000000000081526020015060200191505060405180910390fd5b5b565b6000600082840190508381101515156113aa5760006000fd5b809150506113b456505b92915050565b6114c0848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061188c63ffffffff16565b5b50505050565b603660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561156f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611ad46024913960400191505060405180910390fd5b5b565b60008282111515156115845760006000fd5b600082840390508091505061159556505b92915050565b61166d838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061188c63ffffffff16565b5b505050565b6000600083141561168757600090506116b2565b6000828402905082848281151561169a57fe5b041415156116a85760006000fd5b809150506116b256505b92915050565b60006000821115156116ca5760006000fd5b600082848115156116d757fe5b049050809150506116e456505b92915050565b600060336000505414151561176a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4f6e6c79206265666f72652063726f776466756e64207374617274000000000081526020015060200191505060405180910390fd5b5b565b60006000303b90506000811491505061178256505b90565b600060336000505414151515611806576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4f6e6c792061667465722063726f776466756e6420737461727400000000000081526020015060200191505060405180910390fd5b5b565b6034600050544211151515611889576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f4f6e6c79206265666f72652063726f776466756e6420656e640000000000000081526020015060200191505060405180910390fd5b5b565b6118b38273ffffffffffffffffffffffffffffffffffffffff166119cf909063ffffffff16565b15156118bf5760006000fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b60208310151561191157805182525b6020820191506020810190506020830392506118eb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611973576040519150601f19603f3d011682016040523d82523d6000602084013e611978565b606091505b509150915081151561198a5760006000fd5b6000815111156119c8578080602001905160208110156119aa5760006000fd5b810190808051906020019092919050505015156119c75760006000fd5b5b50505b5050565b60006000823b9050600081119150506119e456505b919050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611a2a57803560ff1916838001178555611a5d565b82800160010185558215611a5d579182015b82811115611a5c5782358260005090905591602001919060010190611a3c565b5b509050611a6a9190611a6e565b5090565b611a969190611a78565b80821115611a925760008181506000905550600101611a78565b5090565b9056fe596f757220636f6e747269627574696f6e20776f756c64206578636565642074686520746f74616c20616d6f756e74207265717565737465642e4f6e6c792074686520626f72726f7765722063616e2063616c6c2066756e6374696f6e2e436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645769746864726177616c2077696c6c206c65616420746f2072657061796d656e7420696e62616c616e6365a265627a7a72315820e74bded1e4818bde30f7635ff047df951d8556a4cc8926888695b31fc10baec664736f6c634300050b0032","compiler":{"name":"solc","version":"0.5.11+commit.c082d0b4.Emscripten.clang","optimizer":{},"evmVersion":"constantinople"}}
