@@ -19,23 +19,23 @@ pragma solidity 0.4.18;
1919 along with this program. If not, see <http://www.gnu.org/licenses/>.
2020*/
2121
22- import "giveth- liquidpledging/contracts/LiquidPledging.sol " ;
22+ import "@ giveth/ liquidpledging-contract /contracts/LiquidPledging.sol " ;
2323import "@aragon/os/contracts/apps/AragonApp.sol " ;
2424import "@aragon/os/contracts/kernel/IKernel.sol " ;
25- import "giveth- bridge/contracts/IForeignGivethBridge.sol " ;
25+ import "@ giveth/ bridge-contract /contracts/IForeignGivethBridge.sol " ;
2626
2727
2828/// @title LPPCappedMilestone
2929/// @author RJ Ewing<perissology@protonmail.com>
3030/// @notice The LPPCappedMilestone contract is a plugin contract for liquidPledging,
3131/// extending the functionality of a liquidPledging project. This contract
3232/// prevents withdrawals from any pledges this contract is the owner of.
33- /// This contract has 4 roles. The admin, a reviewer, and a recipient role.
33+ /// This contract has 4 roles. The admin, a reviewer, and a recipient role.
3434///
3535/// 1. The admin can cancel the milestone, update the conditions the milestone accepts transfers
36- /// and send a tx as the milestone.
37- /// 2. The reviewer can cancel the milestone.
38- /// 3. The recipient role will receive the pledge's owned by this milestone.
36+ /// and send a tx as the milestone.
37+ /// 2. The reviewer can cancel the milestone.
38+ /// 3. The recipient role will receive the pledge's owned by this milestone.
3939
4040contract LPPCappedMilestone is AragonApp {
4141 uint constant TO_OWNER = 256 ;
@@ -47,7 +47,7 @@ contract LPPCappedMilestone is AragonApp {
4747 uint64 public idProject;
4848
4949 address public reviewer;
50- address public newReviewer;
50+ address public newReviewer;
5151 address public recipient;
5252 address public newRecipient;
5353 address public campaignReviewer;
@@ -94,16 +94,16 @@ contract LPPCappedMilestone is AragonApp {
9494 modifier onlyManagerOrRecipient () {
9595 require (msg .sender == milestoneManager || msg .sender == recipient);
9696 _;
97- }
97+ }
9898
99- modifier checkReviewTimeout () {
99+ modifier checkReviewTimeout () {
100100 if (! completed && reviewTimeout > 0 && now > reviewTimeout) {
101101 completed = true ;
102102 }
103103 require (completed);
104- _;
104+ _;
105105 }
106-
106+
107107 //== constructor
108108
109109 // @notice we pass in the idProject here because it was throwing stack too deep error
@@ -120,7 +120,7 @@ contract LPPCappedMilestone is AragonApp {
120120 uint64 _idProject
121121 ) onlyInit external
122122 {
123- require (_reviewer != 0 );
123+ require (_reviewer != 0 );
124124 require (_campaignReviewer != 0 );
125125 require (_recipient != 0 );
126126 require (_milestoneManager != 0 );
@@ -136,11 +136,11 @@ contract LPPCappedMilestone is AragonApp {
136136
137137 maxAmount = _maxAmount;
138138 acceptedToken = _acceptedToken;
139- reviewer = _reviewer;
139+ reviewer = _reviewer;
140140 recipient = _recipient;
141141 reviewTimeoutSeconds = _reviewTimeoutSeconds;
142142 campaignReviewer = _campaignReviewer;
143- milestoneManager = _milestoneManager;
143+ milestoneManager = _milestoneManager;
144144 }
145145
146146 //== external
@@ -158,23 +158,23 @@ contract LPPCappedMilestone is AragonApp {
158158 require (! requestComplete);
159159
160160 requestComplete = true ;
161- MilestoneCompleteRequested (liquidPledging, idProject);
162-
161+ MilestoneCompleteRequested (liquidPledging, idProject);
162+
163163 // start the review timeout
164- reviewTimeout = now + reviewTimeoutSeconds;
164+ reviewTimeout = now + reviewTimeoutSeconds;
165165 }
166166
167167 // @notice The reviewer can reject a completion request from the milestone manager
168168 // When he does, the timeout is reset.
169169 function rejectCompleteRequest () onlyReviewer external {
170170 require (! isCanceled ());
171171
172- // reset
172+ // reset
173173 completed = false ;
174174 requestComplete = false ;
175175 reviewTimeout = 0 ;
176176 MilestoneCompleteRequestRejected (liquidPledging, idProject);
177- }
177+ }
178178
179179 // @notice The reviewer can approve a completion request from the milestone manager
180180 // When he does, the milestone's state is set to completed and the funds can be
@@ -183,7 +183,7 @@ contract LPPCappedMilestone is AragonApp {
183183 require (! isCanceled ());
184184
185185 completed = true ;
186- MilestoneCompleteRequestApproved (liquidPledging, idProject);
186+ MilestoneCompleteRequestApproved (liquidPledging, idProject);
187187 }
188188
189189 // @notice The reviewer and the milestone manager can cancel a milestone.
@@ -192,55 +192,55 @@ contract LPPCappedMilestone is AragonApp {
192192 require (! isCanceled ());
193193
194194 liquidPledging.cancelProject (idProject);
195- }
195+ }
196196
197197 // @notice The reviewer can request changing a reviewer.
198198 function requestChangeReviewer (address _newReviewer ) onlyReviewer external {
199199 newReviewer = _newReviewer;
200200
201- MilestoneChangeReviewerRequested (liquidPledging, idProject, newReviewer);
202- }
201+ MilestoneChangeReviewerRequested (liquidPledging, idProject, newReviewer);
202+ }
203203
204204 // @notice The new reviewer needs to accept the request from the old
205205 // reviewer to become the new reviewer.
206206 // @dev There's no point in adding a rejectNewReviewer because as long as
207- // the new reviewer doesn't accept, the old reviewer remains the reviewer.
207+ // the new reviewer doesn't accept, the old reviewer remains the reviewer.
208208 function acceptNewReviewerRequest () external {
209209 require (newReviewer == msg .sender );
210210
211211 reviewer = newReviewer;
212212 newReviewer = 0 ;
213213
214- MilestoneReviewerChanged (liquidPledging, idProject, reviewer);
215- }
214+ MilestoneReviewerChanged (liquidPledging, idProject, reviewer);
215+ }
216216
217217 // @notice The campaign reviewer can request changing a campaign reviewer.
218218 function requestChangeCampaignReviewer (address _newCampaignReviewer ) onlyCampaignReviewer external {
219219 newCampaignReviewer = _newCampaignReviewer;
220220
221- MilestoneChangeCampaignReviewerRequested (liquidPledging, idProject, newReviewer);
222- }
221+ MilestoneChangeCampaignReviewerRequested (liquidPledging, idProject, newReviewer);
222+ }
223223
224224 // @notice The new campaign reviewer needs to accept the request from the old
225225 // campaign reviewer to become the new campaign reviewer.
226226 // @dev There's no point in adding a rejectNewCampaignReviewer because as long as
227- // the new reviewer doesn't accept, the old reviewer remains the reviewer.
227+ // the new reviewer doesn't accept, the old reviewer remains the reviewer.
228228 function acceptNewCampaignReviewerRequest () external {
229229 require (newCampaignReviewer == msg .sender );
230230
231231 campaignReviewer = newCampaignReviewer;
232232 newCampaignReviewer = 0 ;
233233
234- MilestoneCampaignReviewerChanged (liquidPledging, idProject, reviewer);
235- }
234+ MilestoneCampaignReviewerChanged (liquidPledging, idProject, reviewer);
235+ }
236236
237237 // @notice The recipient can request changing recipient.
238238 // @dev There's no point in adding a rejectNewRecipient because as long as
239239 // the new recipient doesn't accept, the old recipient remains the recipient.
240240 function requestChangeRecipient (address _newRecipient ) onlyReviewer external {
241241 newRecipient = _newRecipient;
242242
243- MilestoneChangeRecipientRequested (liquidPledging, idProject, newRecipient);
243+ MilestoneChangeRecipientRequested (liquidPledging, idProject, newRecipient);
244244 }
245245
246246 // @notice The new recipient needs to accept the request from the old
@@ -251,9 +251,9 @@ contract LPPCappedMilestone is AragonApp {
251251 recipient = newRecipient;
252252 newRecipient = 0 ;
253253
254- MilestoneRecipientChanged (liquidPledging, idProject, recipient);
254+ MilestoneRecipientChanged (liquidPledging, idProject, recipient);
255255
256- }
256+ }
257257
258258 /// @dev this is called by liquidPledging before every transfer to and from
259259 /// a pledgeAdmin that has this contract as its plugin
@@ -268,7 +268,7 @@ contract LPPCappedMilestone is AragonApp {
268268 ) external returns (uint maxAllowed )
269269 {
270270 require (msg .sender == address (liquidPledging));
271-
271+
272272 // only accept that token
273273 if (token != acceptedToken) {
274274 return 0 ;
@@ -384,7 +384,7 @@ contract LPPCappedMilestone is AragonApp {
384384
385385 if (amount > 0 ) {
386386 bridge.withdraw (recipient, acceptedToken, amount);
387- PaymentCollected (liquidPledging, idProject);
387+ PaymentCollected (liquidPledging, idProject);
388388 }
389389 }
390390}
0 commit comments