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