Skip to content

Commit 4e2b819

Browse files
committed
whitelist and auction change
1 parent 01714e0 commit 4e2b819

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

contracts/Auction/Auction.sol

+13-9
Original file line numberDiff line numberDiff line change
@@ -438,19 +438,22 @@ contract AuctionFundCollector is IndividualBonus {
438438
safeMul(_amount, _currencyPrice),
439439
safeExponent(10, _decimal)
440440
);
441+
442+
// Does not check 1:1 contribution if investment from Exchange
443+
if (!IWhiteList(whiteListAddress).isExchangeAddress(IWhiteList(whiteListAddress).address_belongs(_caller))) {
444+
// actually '_caller' = '_recipient'
445+
if (auctionDay >= mainTokencheckDay) {
446+
mainTokenCheck(_caller, _contributedAmount);
447+
}
441448

442-
// Here we check caller balance
443-
if (auctionDay >= mainTokencheckDay) {
444-
mainTokenCheck(_caller, _contributedAmount);
449+
mainTokenCheckDayWise[auctionDay][_caller] = safeAdd(
450+
mainTokenCheckDayWise[auctionDay][_caller],
451+
_contributedAmount
452+
);
445453
}
446454

447455
todayContribution = safeAdd(todayContribution, _contributedAmount);
448456

449-
mainTokenCheckDayWise[auctionDay][_caller] = safeAdd(
450-
walletDayWiseContribution[auctionDay][_caller],
451-
_contributedAmount
452-
);
453-
454457
walletDayWiseContribution[auctionDay][_recipient] = safeAdd(
455458
walletDayWiseContribution[auctionDay][_recipient],
456459
_contributedAmount
@@ -479,6 +482,7 @@ contract AuctionFundCollector is IndividualBonus {
479482
currentMarketPrice
480483
);
481484

485+
// why do we need it?
482486
if (_caller != _recipient) {
483487
emit FundAddedBehalf(_caller, _recipient);
484488
}
@@ -947,4 +951,4 @@ contract Auction is
947951
function() external payable {
948952
revert("ERR_CAN'T_FORCE_ETH");
949953
}
950-
}
954+
}

contracts/WhiteList/WhiteList.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ contract WhiteList is
257257
notZeroAddress(_subWallet)
258258
returns (bool)
259259
{
260-
require(auctionAddress == msg.sender,"ERR_ONLY_AUCTION_ADDRESS_ALLOWED");
260+
require(auctionAddress == msg.sender || msg.sender == systemAddress,"ERR_ONLY_AUCTION_ADDRESS_ALLOWED");
261261
if(_mainWallet != address(0)){
262262
return _addMoreWallets(_mainWallet,_subWallet);
263263
}else{

0 commit comments

Comments
 (0)