Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

32 locked price #33

Merged
merged 6 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions contracts/Sales.sol
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ contract Sales is SalesBase, ISales {

/**
* @param _sellingToken address of ITR token
* @param _timestamps array of timestamps
* @param _prices price exchange
* @param _amountRaised raised amount
* @param _priceSettings PriceSettings struct's array
* uint64 timestamp timestamp
* uint256 price price exchange
* uint256 amountRaised raised amount
* @param _endTime after this time exchange stop
* @param _thresholds thresholds
* @param _bonuses bonuses
* @param _bonusSettings ThresholdBonuses struct's array
* uint256 threshold thresholds
* uint256 bonus bonuses
* @param _ownerCanWithdraw enum option where:
* 0 -owner can not withdraw tokens
* 1 -owner can withdraw tokens only after endTimePassed
Expand All @@ -90,18 +92,19 @@ contract Sales is SalesBase, ISales {
* bytes4 method;
* uint8 role;
* bool useWhitelist;
* @param _lockedInPrice lockedInPrice struct
* uint256 minimumLockedInAmount Minimum amount required to buy and hold the price.
* uint256 maximumLockedInAmount Maximum amount available to buy at the held price.
* @param _costManager costmanager address
*/
function init(
address _sellingToken,
uint64[] memory _timestamps,
uint256[] memory _prices,
uint256[] memory _amountRaised,
PriceSettings[] memory _priceSettings,
uint64 _endTime,
uint256[] memory _thresholds,
uint256[] memory _bonuses,
ThresholdBonuses[] memory _bonusSettings,
EnumWithdraw _ownerCanWithdraw,
WhitelistStruct memory _whitelistData,
LockedInPrice memory _lockedInPrice,
address _costManager,
address _producedBy
)
Expand All @@ -112,14 +115,12 @@ contract Sales is SalesBase, ISales {
{
__SalesBase__init(
_sellingToken,
_timestamps,
_prices,
_amountRaised,
_priceSettings,
_endTime,
_thresholds,
_bonuses,
_bonusSettings,
_ownerCanWithdraw,
_whitelistData,
_lockedInPrice,
_costManager
);

Expand Down
31 changes: 16 additions & 15 deletions contracts/SalesAggregator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ contract SalesAggregator is SalesBase, ISalesAggregator {
* @param _sellingToken address of ITR token
* @param _token0 USD Coin
* @param _token1 Wrapped token (WETH,WBNB,...)
* @param _timestamps array of timestamps
* @param _prices price exchange
* @param _amountRaised raised amount
* @param _priceSettings PriceSettings struct's array
* uint64 timestamp timestamp
* uint256 price price exchange
* uint256 amountRaised raised amount
* @param _endTime after this time exchange stop
* @param _thresholds thresholds
* @param _bonuses bonuses
* @param _bonusSettings ThresholdBonuses struct's array
* uint256 threshold thresholds
* uint256 bonus bonuses
* @param _ownerCanWithdraw enum option where:
* 0 -owner can not withdraw tokens
* 1 -owner can withdraw tokens only after endTimePassed
Expand All @@ -104,20 +106,21 @@ contract SalesAggregator is SalesBase, ISalesAggregator {
* bytes4 method;
* uint8 role;
* bool useWhitelist;
* @param _lockedInPrice lockedInPrice struct
* uint256 minimumLockedInAmount Minimum amount required to buy and hold the price.
* uint256 maximumLockedInAmount Maximum amount available to buy at the held price.
* @param _costManager costmanager address
*/
function init(
address _sellingToken,
address _token0,
address _token1,
uint64[] memory _timestamps,
uint256[] memory _prices,
uint256[] memory _amountRaised,
PriceSettings[] memory _priceSettings,
uint64 _endTime,
uint256[] memory _thresholds,
uint256[] memory _bonuses,
ThresholdBonuses[] memory _bonusSettings,
EnumWithdraw _ownerCanWithdraw,
WhitelistStruct memory _whitelistData,
LockedInPrice memory _lockedInPrice,
address _costManager,
address _producedBy
)
Expand All @@ -128,14 +131,12 @@ contract SalesAggregator is SalesBase, ISalesAggregator {
{
__SalesBase__init(
_sellingToken,
_timestamps,
_prices,
_amountRaised,
_priceSettings,
_endTime,
_thresholds,
_bonuses,
_bonusSettings,
_ownerCanWithdraw,
_whitelistData,
_lockedInPrice,
_costManager
);

Expand Down
Loading