Skip to content

Commit

Permalink
change price in milestone (issue TokenMarketNet#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
agnesenvaite committed May 18, 2019
1 parent df9d272 commit bec0d51
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions contracts/MilestonePricing.sol
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,18 @@ contract MilestonePricing is PricingStrategy, Ownable {
return getCurrentMilestone().price;
}


// @dev change current milestone price
function setCurrentPrice (uint price) public onlyOwner {
uint i;

for(i=0; i<milestones.length; i++) {
if(now < milestones[i].time) {
milestones[i-1].price = price;
}
}
}

/// @dev Calculate the current price for buy in amount.
function calculatePrice(uint value, uint weiRaised, uint tokensSold, address msgSender, uint decimals) public constant returns (uint) {

Expand Down

0 comments on commit bec0d51

Please sign in to comment.