ETH Price: $3,611.71 (+9.41%)

Contract

0xBE56ab825fD35678A32dc35bc4EB17e238e1404F
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Compound212713582024-11-26 10:34:4733 hrs ago1732617287IN
0xBE56ab82...238e1404F
0 ETH0.0002756813.08780426
Compound212713232024-11-26 10:27:3533 hrs ago1732616855IN
0xBE56ab82...238e1404F
0 ETH0.000187938.92209995
Compound212713192024-11-26 10:26:4733 hrs ago1732616807IN
0xBE56ab82...238e1404F
0 ETH0.000166857.92110586
Compound212713132024-11-26 10:25:3533 hrs ago1732616735IN
0xBE56ab82...238e1404F
0 ETH0.000172318.18076753
Compound212713112024-11-26 10:25:1133 hrs ago1732616711IN
0xBE56ab82...238e1404F
0 ETH0.000172718.19940987
Compound212713102024-11-26 10:24:5933 hrs ago1732616699IN
0xBE56ab82...238e1404F
0 ETH0.000176968.4013929
Approve212656112024-11-25 15:17:232 days ago1732547843IN
0xBE56ab82...238e1404F
0 ETH0.0018204739.0583873
Claim212655872024-11-25 15:12:352 days ago1732547555IN
0xBE56ab82...238e1404F
0 ETH0.0031744736.60728245
Claim212655732024-11-25 15:09:472 days ago1732547387IN
0xBE56ab82...238e1404F
0 ETH0.0006867232.34859445
Transfer212578622024-11-24 13:20:353 days ago1732454435IN
0xBE56ab82...238e1404F
0 ETH0.0017166610.67857332
Approve212578392024-11-24 13:15:473 days ago1732454147IN
0xBE56ab82...238e1404F
0 ETH0.0005174311.17073687
Approve212578202024-11-24 13:11:593 days ago1732453919IN
0xBE56ab82...238e1404F
0 ETH0.0005330811.50852152
Approve212578052024-11-24 13:08:593 days ago1732453739IN
0xBE56ab82...238e1404F
0 ETH0.0005817812.55988442
Approve212554722024-11-24 5:19:353 days ago1732425575IN
0xBE56ab82...238e1404F
0 ETH0.000412098.89655546
Approve212545632024-11-24 2:17:113 days ago1732414631IN
0xBE56ab82...238e1404F
0 ETH0.0005711112.269168
Claim212445402024-11-22 16:43:475 days ago1732293827IN
0xBE56ab82...238e1404F
0 ETH0.00184615.26674823
Approve212424452024-11-22 9:42:235 days ago1732268543IN
0xBE56ab82...238e1404F
0 ETH0.000439959.49309848
Claim212424392024-11-22 9:41:115 days ago1732268471IN
0xBE56ab82...238e1404F
0 ETH0.0007109310.21215856
Approve212237532024-11-19 19:04:358 days ago1732043075IN
0xBE56ab82...238e1404F
0 ETH0.0010380322.2711161
Claim212200692024-11-19 6:45:238 days ago1731998723IN
0xBE56ab82...238e1404F
0 ETH0.000677019.72480695
Approve212151672024-11-18 14:21:239 days ago1731939683IN
0xBE56ab82...238e1404F
0 ETH0.0008767118.93671508
Approve212151382024-11-18 14:15:239 days ago1731939323IN
0xBE56ab82...238e1404F
0 ETH0.0013814329.8
Approve212107972024-11-17 23:44:359 days ago1731887075IN
0xBE56ab82...238e1404F
0 ETH0.000427959.19361165
Approve212107342024-11-17 23:31:599 days ago1731886319IN
0xBE56ab82...238e1404F
0 ETH0.000426199.14409949
Claim212107292024-11-17 23:30:599 days ago1731886259IN
0xBE56ab82...238e1404F
0 ETH0.001154539.54817326
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
163936222023-01-12 22:12:47684 days ago1673561567
0xBE56ab82...238e1404F
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Digits

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : Digits.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

import "./DividendTracker.sol";
import "./interfaces/ITokenStorage.sol";
import "./interfaces/IDigits.sol";

contract Digits is Ownable, IERC20, IDigits {
    using SafeERC20 for IERC20;

    /* ============ State ============ */

    address public constant DEAD = 0x000000000000000000000000000000000000dEaD;

    string private constant _name = "Digits";
    string private constant _symbol = "DIGITS";

    DividendTracker public immutable dividendTracker;
    IUniswapV2Router02 public immutable uniswapV2Router;
    IERC20 public immutable dai;
    ITokenStorage public tokenStorage;

    address public multiRewards; // Can trigger dividend distribution.
    address public marketingWallet;
    address public uniswapV2Pair;

    uint256 public treasuryFeeBPS = 700;
    uint256 public liquidityFeeBPS = 200;
    uint256 public dividendFeeBPS = 300;
    uint256 public totalFeeBPS = 1200;
    uint256 public swapTokensAtAmount = 100000 * (10**18);
    uint256 public lastSwapTime;
    uint256 public maxTxBPS = 49;
    uint256 public maxWalletBPS = 200;

    bool public isOpen = false;
    bool public swapAllToken = true;
    bool public swapEnabled = true;
    bool public taxEnabled = true;
    bool public compoundingEnabled = true;

    mapping(address => bool) public automatedMarketMakerPairs;

    uint256 private _maxTxAmount;
    uint256 private _maxWallet;
    uint256 private _totalSupply;

    bool private swapping;

    mapping(address => uint256) private _balances;
    mapping(address => mapping(address => uint256)) private _allowances;
    mapping(address => bool) private _isExcludedFromFees;
    mapping(address => bool) private _whiteList;
    mapping(address => bool) private _isExcludedFromMaxTx;
    mapping(address => bool) private _isExcludedFromMaxWallet;

    constructor(
        address _dai,
        address _uniswapRouter,
        address _marketingWallet,
        address[] memory whitelistAddress
    ) {
        require(_dai != address(0), "DAI address zero");
        require(_uniswapRouter != address(0), "Uniswap router address zero");
        require(
            _marketingWallet != address(0),
            "Marketing wallet address zero"
        );

        dai = IERC20(_dai);
        marketingWallet = _marketingWallet;
        includeToWhiteList(whitelistAddress);

        uniswapV2Router = IUniswapV2Router02(_uniswapRouter);
        uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
                address(this),
                _dai
            );

        dividendTracker = new DividendTracker(
            _dai,
            address(this),
            address(uniswapV2Router)
        );

        _setAutomatedMarketMakerPair(uniswapV2Pair, true);

        dividendTracker.excludeFromDividends(address(dividendTracker), true);
        dividendTracker.excludeFromDividends(address(this), true);
        dividendTracker.excludeFromDividends(owner(), true);
        dividendTracker.excludeFromDividends(address(uniswapV2Router), true);
        dividendTracker.excludeFromDividends(address(DEAD), true);

        excludeFromFees(owner(), true);
        excludeFromFees(address(this), true);
        excludeFromFees(address(dividendTracker), true);

        excludeFromMaxTx(owner(), true);
        excludeFromMaxTx(address(this), true);
        excludeFromMaxTx(address(dividendTracker), true);

        excludeFromMaxWallet(owner(), true);
        excludeFromMaxWallet(address(this), true);
        excludeFromMaxWallet(address(dividendTracker), true);

        _mint(owner(), 1000000000 * (10**18));

        // Calcualte initial values, update later in setters.
        _maxTxAmount = (totalSupply() * maxTxBPS) / 10000;
        _maxWallet = (totalSupply() * maxWalletBPS) / 10000;
    }

    /* ============ External View Functions ============ */

    function name() external view returns (string memory) {
        return _name;
    }

    function symbol() external view returns (string memory) {
        return _symbol;
    }

    function decimals() external view returns (uint8) {
        return 18;
    }

    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account)
        public
        view
        virtual
        override
        returns (uint256)
    {
        return _balances[account];
    }

    function allowance(address owner, address spender)
        external
        view
        virtual
        override
        returns (uint256)
    {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount)
        external
        virtual
        override
        returns (bool)
    {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    function withdrawableDividendOf(address account)
        external
        view
        returns (uint256)
    {
        return dividendTracker.withdrawableDividendOf(account);
    }

    function isExcludedFromDividends(address account)
        external
        view
        returns (bool)
    {
        return dividendTracker.isExcludedFromDividends(account);
    }

    function isExcludedFromFees(address account) external view returns (bool) {
        return _isExcludedFromFees[account];
    }

    function isExcludedFromMaxTx(address account) external view returns (bool) {
        return _isExcludedFromMaxTx[account];
    }

    function isExcludedFromMaxWallet(address account)
        external
        view
        returns (bool)
    {
        return _isExcludedFromMaxWallet[account];
    }

    /* ============ External Functions ============ */

    function increaseAllowance(address spender, uint256 addedValue)
        external
        returns (bool)
    {
        _approve(
            _msgSender(),
            spender,
            _allowances[_msgSender()][spender] + addedValue
        );
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue)
        external
        returns (bool)
    {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(
            currentAllowance >= subtractedValue,
            "Digits: decreased allowance < 0"
        );
        _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        return true;
    }

    function triggerDividendDistribution() external {
        require(msg.sender == multiRewards, "Only callable by MultiRewards");

        uint256 contractTokenBalance = balanceOf(address(tokenStorage));

        uint256 contractDaiBalance = dai.balanceOf(address(tokenStorage));

        bool canSwap = contractTokenBalance >= swapTokensAtAmount;

        if (
            swapEnabled && // True
            canSwap && // true
            !swapping // swapping=false !false true
        ) {
            swapping = true;

            if (!swapAllToken) {
                contractTokenBalance = swapTokensAtAmount;
            }
            _executeSwap(contractTokenBalance, contractDaiBalance);

            lastSwapTime = block.timestamp;
            swapping = false;
        }
    }

    function transfer(address recipient, uint256 amount)
        external
        virtual
        override
        returns (bool)
    {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "Digits: tx amount > allowance");
        _approve(sender, _msgSender(), currentAllowance - amount);
        return true;
    }

    function claim() external {
        bool result = dividendTracker.processAccount(_msgSender());

        require(result, "Digits: claim failed");
    }

    function compound() external {
        require(compoundingEnabled, "Digits: compounding not enabled");
        bool result = dividendTracker.compoundAccount(_msgSender());

        require(result, "Digits: compounding failed");
    }

    /* ============ Internal/Private Functions ============ */

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        require(
            isOpen ||
                sender == owner() ||
                recipient == owner() ||
                _whiteList[sender] ||
                _whiteList[recipient],
            "Not Open"
        );

        require(sender != address(0), "Digits: transfer from 0 address");
        require(recipient != address(0), "Digits: transfer to 0 address");
        require(
            amount <= _maxTxAmount || _isExcludedFromMaxTx[sender],
            "TX Limit Exceeded"
        );

        if (
            sender != owner() &&
            recipient != address(this) &&
            recipient != address(DEAD) &&
            recipient != uniswapV2Pair
        ) {
            uint256 currentBalance = balanceOf(recipient);
            require(
                _isExcludedFromMaxWallet[recipient] ||
                    (currentBalance + amount <= _maxWallet)
            );
        }

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "Digits: transfer exceeds balance");

        uint256 contractTokenBalance = balanceOf(address(tokenStorage));
        uint256 contractDaiBalance = dai.balanceOf(address(tokenStorage));

        bool canSwap = contractTokenBalance >= swapTokensAtAmount;

        if (
            swapEnabled && // True
            canSwap && // true
            !swapping && // swapping=false !false true
            !automatedMarketMakerPairs[sender] && // no swap on remove liquidity step 1 or DEX buy
            sender != address(uniswapV2Router) && // no swap on remove liquidity step 2
            sender != owner() &&
            recipient != owner()
        ) {
            swapping = true;

            if (!swapAllToken) {
                contractTokenBalance = swapTokensAtAmount;
            }
            _executeSwap(contractTokenBalance, contractDaiBalance);

            lastSwapTime = block.timestamp;
            swapping = false;
        }

        bool takeFee = false;

        if (
            sender == address(uniswapV2Pair) ||
            recipient == address(uniswapV2Pair)
        ) {
            takeFee = true;
        }

        if (_isExcludedFromFees[sender] || _isExcludedFromFees[recipient]) {
            takeFee = false;
        }

        if (swapping || !taxEnabled) {
            takeFee = false;
        }

        if (takeFee) {
            uint256 fees = (amount * totalFeeBPS) / 10000;
            amount -= fees;
            _executeTransfer(sender, address(tokenStorage), fees);
        }

        _executeTransfer(sender, recipient, amount);

        dividendTracker.setBalance(sender, balanceOf(sender));
        dividendTracker.setBalance(recipient, balanceOf(recipient));
    }

    function _executeTransfer(
        address sender,
        address recipient,
        uint256 amount
    ) private {
        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "Digits: tx amount > balance");
        _balances[sender] = senderBalance - amount;
        _balances[recipient] += amount;
        emit Transfer(sender, recipient, amount);
    }

    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) private {
        require(owner != address(0), "Digits: approve from 0 address");
        require(spender != address(0), "Digits: approve to 0 address");
        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    function _mint(address account, uint256 amount) private {
        require(account != address(0), "Digits: mint to the zero address");
        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);
    }

    function includeToWhiteList(address[] memory _users) private {
        for (uint8 i = 0; i < _users.length; i++) {
            _whiteList[_users[i]] = true;
        }
    }

    function _executeSwap(uint256 tokens, uint256 dais) private {
        if (tokens == 0) {
            return;
        }

        uint256 swapTokensMarketing = 0;
        if (address(marketingWallet) != address(0) && totalFeeBPS > 0) {
            swapTokensMarketing = (tokens * treasuryFeeBPS) / totalFeeBPS;
        }

        uint256 swapTokensDividends = 0;
        if (dividendTracker.totalSupply() > 0 && totalFeeBPS > 0) {
            swapTokensDividends = (tokens * dividendFeeBPS) / totalFeeBPS;
        }

        uint256 tokensForLiquidity = tokens -
            swapTokensMarketing -
            swapTokensDividends;
        uint256 swapTokensLiquidity = tokensForLiquidity / 2;
        uint256 addTokensLiquidity = tokensForLiquidity - swapTokensLiquidity;
        uint256 swapTokensTotal = swapTokensMarketing +
            swapTokensDividends +
            swapTokensLiquidity;

        uint256 initDaiBal = dai.balanceOf(address(tokenStorage));
        tokenStorage.swapTokensForDai(swapTokensTotal);
        uint256 daiSwapped = (dai.balanceOf(address(tokenStorage)) -
            initDaiBal) + dais;

        uint256 daiMarketing = (daiSwapped * swapTokensMarketing) /
            swapTokensTotal;
        uint256 daiDividends = (daiSwapped * swapTokensDividends) /
            swapTokensTotal;
        uint256 daiLiquidity = daiSwapped - daiMarketing - daiDividends;

        if (daiMarketing > 0) {
            tokenStorage.transferDai(marketingWallet, daiMarketing);
        }

        tokenStorage.addLiquidity(addTokensLiquidity, daiLiquidity);
        emit SwapAndAddLiquidity(
            swapTokensLiquidity,
            daiLiquidity,
            addTokensLiquidity
        );

        if (daiDividends > 0) {
            tokenStorage.distributeDividends(swapTokensDividends, daiDividends);
        }
    }

    function _setAutomatedMarketMakerPair(address pair, bool value) private {
        require(
            automatedMarketMakerPairs[pair] != value,
            "Digits: AMM pair is same value"
        );
        automatedMarketMakerPairs[pair] = value;
        if (value) {
            dividendTracker.excludeFromDividends(pair, true);
        }
        emit SetAutomatedMarketMakerPair(pair, value);
    }

    /* ============ External Owner Functions ============ */

    function setMultiRewardsAddress(address _multiRewards) external onlyOwner {
        require(_multiRewards != address(0), "Cannot set address zero");
        multiRewards = _multiRewards;
    }

    function setTokenStorage(address _tokenStorage) external onlyOwner {
        require(
            address(tokenStorage) == address(0),
            "Digits: tokenStorage already set"
        );

        tokenStorage = ITokenStorage(_tokenStorage);
        dividendTracker.excludeFromDividends(address(tokenStorage), true);
        excludeFromFees(address(tokenStorage), true);
        excludeFromMaxTx(address(tokenStorage), true);
        excludeFromMaxWallet(address(tokenStorage), true);
        emit SetTokenStorage(_tokenStorage);
    }

    function setWallet(address _marketingWallet, address _liquidityWallet)
        external
        onlyOwner
    {
        require(_marketingWallet != address(0), "Digits: zero!");
        require(_liquidityWallet != address(0), "Digits: zero!");

        marketingWallet = _marketingWallet;
        tokenStorage.setLiquidityWallet(_liquidityWallet);
    }

    function setAutomatedMarketMakerPair(address pair, bool value)
        external
        onlyOwner
    {
        require(pair != uniswapV2Pair, "Digits: LP can not be removed");
        _setAutomatedMarketMakerPair(pair, value);
    }

    function setFee(
        uint256 _treasuryFee,
        uint256 _liquidityFee,
        uint256 _dividendFee
    ) external onlyOwner {
        require(
            _treasuryFee <= 800 && _liquidityFee <= 800 && _dividendFee <= 800,
            "Each fee must be below 8%"
        );

        treasuryFeeBPS = _treasuryFee;
        liquidityFeeBPS = _liquidityFee;
        dividendFeeBPS = _dividendFee;
        totalFeeBPS = _treasuryFee + _liquidityFee + _dividendFee;

        emit SetFee(_treasuryFee, _liquidityFee, _dividendFee);
    }

    function setSwapEnabled(bool _enabled) external onlyOwner {
        swapEnabled = _enabled;
        emit SwapEnabled(_enabled);
    }

    function setTaxEnabled(bool _enabled) external onlyOwner {
        taxEnabled = _enabled;
        emit TaxEnabled(_enabled);
    }

    function setCompoundingEnabled(bool _enabled) external onlyOwner {
        compoundingEnabled = _enabled;

        emit CompoundingEnabled(_enabled);
    }

    function setMaxTxBPS(uint256 bps) external onlyOwner {
        require(bps >= 49 && bps <= 10000, "BPS only between 49 and 10000");
        maxTxBPS = bps;
        _maxTxAmount = (totalSupply() * maxTxBPS) / 10000;
        emit SetMaxTxBPS(bps);
    }

    function setMaxWalletBPS(uint256 bps) external onlyOwner {
        require(bps >= 100 && bps <= 10000, "BPS only between 100 and 10000");
        maxWalletBPS = bps;
        _maxWallet = (totalSupply() * maxWalletBPS) / 10000;
        emit SetMaxWalletBPS(bps);
    }

    function openTrading() external onlyOwner {
        isOpen = true;
    }

    function updateDividendSettings(
        bool _swapEnabled,
        uint256 _swapTokensAtAmount,
        bool _swapAllToken
    ) external onlyOwner {
        swapEnabled = _swapEnabled;
        swapTokensAtAmount = _swapTokensAtAmount;
        swapAllToken = _swapAllToken;

        emit UpdateDividendSettings(
            _swapEnabled,
            _swapTokensAtAmount,
            _swapAllToken
        );
    }

    function excludeFromFees(address account, bool excluded) public onlyOwner {
        require(
            _isExcludedFromFees[account] != excluded,
            "Digits: same state value"
        );
        _isExcludedFromFees[account] = excluded;
        emit ExcludeFromFees(account, excluded);
    }

    function excludeFromDividends(address account, bool excluded)
        external
        onlyOwner
    {
        dividendTracker.excludeFromDividends(account, excluded);
    }

    function excludeFromMaxTx(address account, bool excluded) public onlyOwner {
        _isExcludedFromMaxTx[account] = excluded;

        emit ExcludeFromMaxTx(account, excluded);
    }

    function excludeFromMaxWallet(address account, bool excluded)
        public
        onlyOwner
    {
        _isExcludedFromMaxWallet[account] = excluded;

        emit ExcludeFromMaxWallet(account, excluded);
    }

    function rescueToken(address _token, uint256 _amount) external onlyOwner {
        IERC20(_token).safeTransfer(msg.sender, _amount);
    }

    function rescueETH(uint256 _amount) external onlyOwner {
        payable(msg.sender).transfer(_amount);
    }
}

File 2 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract 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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 14 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 5 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 6 of 14 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 14 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 14 : IUniswapV2Factory.sol
pragma solidity >=0.5.0;

interface IUniswapV2Factory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 9 of 14 : IUniswapV2Router01.sol
pragma solidity >=0.6.2;

interface IUniswapV2Router01 {
    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 removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 10 of 14 : IUniswapV2Router02.sol
pragma solidity >=0.6.2;

import './IUniswapV2Router01.sol';

interface IUniswapV2Router02 is IUniswapV2Router01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    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;
}

File 11 of 14 : DividendTracker.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol";

import "./interfaces/IDividendTracker.sol";

contract DividendTracker is Ownable, IERC20, IDividendTracker {
    using SafeERC20 for IERC20;

    /* ============ State ============ */

    string private constant _name = "Digits_DividendTracker";
    string private constant _symbol = "Digits_DividendTracker";
    uint256 private constant minTokenBalanceForDividends = 10000 * (10**18);
    uint256 private constant magnitude = 2**128;

    address public immutable dai;
    address public immutable tokenAddress;
    IUniswapV2Router02 public immutable uniswapV2Router;

    uint256 public totalDividendsDistributed;
    uint256 public totalDividendsWithdrawn;

    mapping(address => bool) public excludedFromDividends;

    uint256 private magnifiedDividendPerShare;
    uint256 private _totalSupply;

    mapping(address => uint256) private _balances;
    mapping(address => int256) private magnifiedDividendCorrections;
    mapping(address => uint256) private withdrawnDividends;
    mapping(address => uint256) private lastClaimTimes;

    constructor(
        address _dai,
        address _tokenAddress,
        address _uniswapRouter
    ) {
        require(_dai != address(0), "DAI address zero");
        require(_tokenAddress != address(0), "Token address zero");
        require(_uniswapRouter != address(0), "Uniswap router address zero");

        dai = _dai;
        tokenAddress = _tokenAddress;
        uniswapV2Router = IUniswapV2Router02(_uniswapRouter);
    }

    /* ============ External Functions ============ */

    function distributeDividends(uint256 daiDividends) external {
        require(_totalSupply > 0, "dividends unavailable yet");
        if (daiDividends > 0) {
            IERC20(dai).safeTransferFrom(
                msg.sender,
                address(this),
                daiDividends
            );
            magnifiedDividendPerShare =
                magnifiedDividendPerShare +
                ((daiDividends * magnitude) / _totalSupply);
            emit DividendsDistributed(msg.sender, daiDividends);
            totalDividendsDistributed += daiDividends;
        }
    }

    /* ============ External Owner Functions ============ */

    function setBalance(address account, uint256 newBalance)
        external
        onlyOwner
    {
        if (excludedFromDividends[account]) {
            return;
        }
        if (newBalance >= minTokenBalanceForDividends) {
            _setBalance(account, newBalance);
        } else {
            _setBalance(account, 0);
        }
    }

    function excludeFromDividends(address account, bool excluded)
        external
        onlyOwner
    {
        require(
            excludedFromDividends[account] != excluded,
            "Digits_DividendTracker: account already set to requested state"
        );
        excludedFromDividends[account] = excluded;
        if (excluded) {
            _setBalance(account, 0);
        } else {
            uint256 newBalance = IERC20(tokenAddress).balanceOf(account);
            if (newBalance >= minTokenBalanceForDividends) {
                _setBalance(account, newBalance);
            } else {
                _setBalance(account, 0);
            }
        }
        emit ExcludeFromDividends(account, excluded);
    }

    function processAccount(address account) external onlyOwner returns (bool) {
        uint256 amount = _withdrawDividendOfUser(account);
        if (amount > 0) {
            lastClaimTimes[account] = block.timestamp;
            emit Claim(account, amount);
            return true;
        }
        return false;
    }

    function compoundAccount(address account)
        external
        onlyOwner
        returns (bool)
    {
        (uint256 amount, uint256 tokens) = _compoundDividendOfUser(account);
        if (amount > 0) {
            lastClaimTimes[account] = block.timestamp;
            emit Compound(account, amount, tokens);
            return true;
        }
        return false;
    }

    /* ============ External View Functions ============ */

    function isExcludedFromDividends(address account)
        external
        view
        returns (bool)
    {
        return excludedFromDividends[account];
    }

    function withdrawableDividendOf(address account)
        public
        view
        returns (uint256)
    {
        return accumulativeDividendOf(account) - withdrawnDividends[account];
    }

    function withdrawnDividendOf(address account)
        public
        view
        returns (uint256)
    {
        return withdrawnDividends[account];
    }

    function accumulativeDividendOf(address account)
        public
        view
        returns (uint256)
    {
        int256 a = int256(magnifiedDividendPerShare * balanceOf(account));
        int256 b = magnifiedDividendCorrections[account]; // this is an explicit int256 (signed)
        return uint256(a + b) / magnitude;
    }

    function getAccountInfo(address account)
        external
        view
        returns (
            address,
            uint256,
            uint256,
            uint256,
            uint256
        )
    {
        uint256 withdrawableDividends = withdrawableDividendOf(account);
        uint256 totalDividends = accumulativeDividendOf(account);
        uint256 lastClaimTime = lastClaimTimes[account];
        uint256 withdrawn = withdrawnDividendOf(account);
        return (
            account,
            withdrawableDividends,
            totalDividends,
            lastClaimTime,
            withdrawn
        );
    }

    function getLastClaimTime(address account) external view returns (uint256) {
        return lastClaimTimes[account];
    }

    function name() external view returns (string memory) {
        return _name;
    }

    function symbol() external view returns (string memory) {
        return _symbol;
    }

    function decimals() external view returns (uint8) {
        return 18;
    }

    function totalSupply()
        public
        view
        override(IDividendTracker, IERC20)
        returns (uint256)
    {
        return _totalSupply;
    }

    function balanceOf(address account) public view override returns (uint256) {
        return _balances[account];
    }

    function transfer(address, uint256) public pure override returns (bool) {
        revert("Digits_DividendTracker: method not implemented");
    }

    function allowance(address, address)
        public
        pure
        override
        returns (uint256)
    {
        revert("Digits_DividendTracker: method not implemented");
    }

    function approve(address, uint256) public pure override returns (bool) {
        revert("Digits_DividendTracker: method not implemented");
    }

    function transferFrom(
        address,
        address,
        uint256
    ) public pure override returns (bool) {
        revert("Digits_DividendTracker: method not implemented");
    }

    /* ============ Internal/Private Functions ============ */

    function _setBalance(address account, uint256 newBalance) internal {
        uint256 currentBalance = _balances[account];
        if (newBalance > currentBalance) {
            uint256 addAmount = newBalance - currentBalance;
            _mint(account, addAmount);
        } else if (newBalance < currentBalance) {
            uint256 subAmount = currentBalance - newBalance;
            _burn(account, subAmount);
        }
    }

    function _mint(address account, uint256 amount) private {
        require(
            account != address(0),
            "Digits_DividendTracker: mint to the zero address"
        );
        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);
        magnifiedDividendCorrections[account] =
            magnifiedDividendCorrections[account] -
            int256(magnifiedDividendPerShare * amount);
    }

    function _burn(address account, uint256 amount) private {
        require(
            account != address(0),
            "Digits_DividendTracker: burn from the zero address"
        );
        uint256 accountBalance = _balances[account];
        require(
            accountBalance >= amount,
            "Digits_DividendTracker: burn amount exceeds balance"
        );
        _balances[account] = accountBalance - amount;
        _totalSupply -= amount;
        emit Transfer(account, address(0), amount);
        magnifiedDividendCorrections[account] =
            magnifiedDividendCorrections[account] +
            int256(magnifiedDividendPerShare * amount);
    }

    function _withdrawDividendOfUser(address account)
        private
        returns (uint256)
    {
        uint256 _withdrawableDividend = withdrawableDividendOf(account);
        if (_withdrawableDividend > 0) {
            withdrawnDividends[account] += _withdrawableDividend;
            totalDividendsWithdrawn += _withdrawableDividend;
            emit DividendWithdrawn(account, _withdrawableDividend);

            IERC20(dai).safeTransfer(account, _withdrawableDividend);

            return _withdrawableDividend;
        }
        return 0;
    }

    function _compoundDividendOfUser(address account)
        private
        returns (uint256, uint256)
    {
        uint256 _withdrawableDividend = withdrawableDividendOf(account);
        if (_withdrawableDividend > 0) {
            withdrawnDividends[account] += _withdrawableDividend;
            totalDividendsWithdrawn += _withdrawableDividend;
            emit DividendWithdrawn(account, _withdrawableDividend);

            address[] memory path = new address[](2);
            path[0] = dai;
            path[1] = address(tokenAddress);

            bool success = false;
            uint256 tokens = 0;

            uint256 initTokenBal = IERC20(tokenAddress).balanceOf(account);
            IERC20(dai).approve(
                address(uniswapV2Router),
                _withdrawableDividend
            );
            try
                uniswapV2Router
                    .swapExactTokensForTokensSupportingFeeOnTransferTokens(
                        _withdrawableDividend,
                        0,
                        path,
                        address(account),
                        block.timestamp
                    )
            {
                success = true;
                tokens = IERC20(tokenAddress).balanceOf(account) - initTokenBal;
            } catch Error(
                string memory /*err*/
            ) {
                success = false;
            }

            if (!success) {
                withdrawnDividends[account] -= _withdrawableDividend;
                totalDividendsWithdrawn -= _withdrawableDividend;
                return (0, 0);
            }

            return (_withdrawableDividend, tokens);
        }
        return (0, 0);
    }
}

File 12 of 14 : IDigits.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

interface IDigits {
    event SwapAndAddLiquidity(
        uint256 tokensSwapped,
        uint256 daiReceived,
        uint256 tokensIntoLiquidity
    );
    event ExcludeFromFees(address indexed account, bool isExcluded);
    event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);
    event SetFee(
        uint256 _treasuryFee,
        uint256 _liquidityFee,
        uint256 _dividendFee
    );
    event SwapEnabled(bool enabled);
    event TaxEnabled(bool enabled);
    event CompoundingEnabled(bool enabled);
    event SetTokenStorage(address _tokenStorage);
    event UpdateDividendSettings(
        bool _swapEnabled,
        uint256 _swapTokensAtAmount,
        bool _swapAllToken
    );
    event SetMaxTxBPS(uint256 bps);
    event ExcludeFromMaxTx(address account, bool excluded);
    event SetMaxWalletBPS(uint256 bps);
    event ExcludeFromMaxWallet(address account, bool excluded);

    function claim() external;

    function withdrawableDividendOf(address account)
        external
        view
        returns (uint256);

    function triggerDividendDistribution() external;
}

File 13 of 14 : IDividendTracker.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

interface IDividendTracker {
    event DividendsDistributed(address indexed from, uint256 weiAmount);
    event DividendWithdrawn(address indexed to, uint256 weiAmount);
    event ExcludeFromDividends(address indexed account, bool excluded);
    event Claim(address indexed account, uint256 amount);
    event Compound(address indexed account, uint256 amount, uint256 tokens);

    function distributeDividends(uint256 daiDividends) external;

    function excludeFromDividends(address account, bool excluded) external;

    function setBalance(address account, uint256 newBalance) external;

    function totalSupply() external view returns (uint256);

    function isExcludedFromDividends(address account)
        external
        view
        returns (bool);

    function processAccount(address account) external returns (bool);

    function compoundAccount(address account) external returns (bool);

    function withdrawableDividendOf(address account)
        external
        view
        returns (uint256);

    function withdrawnDividendOf(address account)
        external
        view
        returns (uint256);

    function accumulativeDividendOf(address account)
        external
        view
        returns (uint256);

    function getAccountInfo(address account)
        external
        view
        returns (
            address,
            uint256,
            uint256,
            uint256,
            uint256
        );

    function getLastClaimTime(address account) external view returns (uint256);
}

File 14 of 14 : ITokenStorage.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.10;

interface ITokenStorage {
    event SendDividends(uint256 tokensSwapped, uint256 amount);

    function swapTokensForDai(uint256 tokens) external;

    function transferDai(address to, uint256 amount) external;

    function addLiquidity(uint256 tokens, uint256 dais) external;

    function distributeDividends(
        uint256 swapTokensDividends,
        uint256 daiDividends
    ) external;

    function setLiquidityWallet(address _liquidityWallet) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_dai","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_marketingWallet","type":"address"},{"internalType":"address[]","name":"whitelistAddress","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"CompoundingEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"isExcluded","type":"bool"}],"name":"ExcludeFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludeFromMaxTx","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludeFromMaxWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pair","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"SetAutomatedMarketMakerPair","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_treasuryFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_liquidityFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_dividendFee","type":"uint256"}],"name":"SetFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bps","type":"uint256"}],"name":"SetMaxTxBPS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"bps","type":"uint256"}],"name":"SetMaxWalletBPS","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_tokenStorage","type":"address"}],"name":"SetTokenStorage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokensSwapped","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"daiReceived","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokensIntoLiquidity","type":"uint256"}],"name":"SwapAndAddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SwapEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"TaxEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_swapEnabled","type":"bool"},{"indexed":false,"internalType":"uint256","name":"_swapTokensAtAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"_swapAllToken","type":"bool"}],"name":"UpdateDividendSettings","type":"event"},{"inputs":[],"name":"DEAD","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"automatedMarketMakerPairs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"compoundingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dai","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dividendFeeBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dividendTracker","outputs":[{"internalType":"contract DividendTracker","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromMaxTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromDividends","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromMaxTx","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isExcludedFromMaxWallet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSwapTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityFeeBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTxBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"multiRewards","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pair","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setAutomatedMarketMakerPair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setCompoundingEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_treasuryFee","type":"uint256"},{"internalType":"uint256","name":"_liquidityFee","type":"uint256"},{"internalType":"uint256","name":"_dividendFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"setMaxTxBPS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"bps","type":"uint256"}],"name":"setMaxWalletBPS","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_multiRewards","type":"address"}],"name":"setMultiRewardsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setSwapEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setTaxEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenStorage","type":"address"}],"name":"setTokenStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_marketingWallet","type":"address"},{"internalType":"address","name":"_liquidityWallet","type":"address"}],"name":"setWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapAllToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapTokensAtAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"taxEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenStorage","outputs":[{"internalType":"contract ITokenStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalFeeBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryFeeBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"triggerDividendDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_swapEnabled","type":"bool"},{"internalType":"uint256","name":"_swapTokensAtAmount","type":"uint256"},{"internalType":"bool","name":"_swapAllToken","type":"bool"}],"name":"updateDividendSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"withdrawableDividendOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60e06040526102bc60055560c8600681905561012c6007556104b060085569152d02c7e14af68000006009556031600b55600c55600d805464ffffffffff19166401010101001790553480156200005557600080fd5b5060405162005bc338038062005bc3833981016040819052620000789162000bda565b62000083336200068c565b6001600160a01b038416620000d25760405162461bcd60e51b815260206004820152601060248201526f4441492061646472657373207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b0383166200012a5760405162461bcd60e51b815260206004820152601b60248201527f556e697377617020726f757465722061646472657373207a65726f00000000006044820152606401620000c9565b6001600160a01b038216620001825760405162461bcd60e51b815260206004820152601d60248201527f4d61726b6574696e672077616c6c65742061646472657373207a65726f0000006044820152606401620000c9565b6001600160a01b0384811660c052600380546001600160a01b031916918416919091179055620001b281620006dc565b6001600160a01b03831660a08190526040805163c45a015560e01b8152905163c45a0155916004808201926020929091908290030181865afa158015620001fd573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000223919062000ce5565b6040516364e329cb60e11b81523060048201526001600160a01b038681166024830152919091169063c9c65396906044016020604051808303816000875af115801562000274573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200029a919062000ce5565b600460006101000a8154816001600160a01b0302191690836001600160a01b03160217905550833060a051604051620002d39062000b99565b6001600160a01b03938416815291831660208301529091166040820152606001604051809103906000f08015801562000310573d6000803e3d6000fd5b506001600160a01b03908116608052600454620003309116600162000755565b60805160405162241fbd60e51b81526001600160a01b03909116600482018190526001602483015290630483f7a090604401600060405180830381600087803b1580156200037d57600080fd5b505af115801562000392573d6000803e3d6000fd5b505060805160405162241fbd60e51b8152306004820152600160248201526001600160a01b039091169250630483f7a09150604401600060405180830381600087803b158015620003e257600080fd5b505af1158015620003f7573d6000803e3d6000fd5b505050506080516001600160a01b0316630483f7a06200041c6200089860201b60201c565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260016024820152604401600060405180830381600087803b1580156200046557600080fd5b505af11580156200047a573d6000803e3d6000fd5b505060805160a05160405162241fbd60e51b81526001600160a01b0391821660048201526001602482015291169250630483f7a09150604401600060405180830381600087803b158015620004ce57600080fd5b505af1158015620004e3573d6000803e3d6000fd5b505060805160405162241fbd60e51b815261dead6004820152600160248201526001600160a01b039091169250630483f7a09150604401600060405180830381600087803b1580156200053557600080fd5b505af11580156200054a573d6000803e3d6000fd5b505050506200056a620005626200089860201b60201c565b6001620008a7565b62000577306001620008a7565b60805162000587906001620008a7565b620005a66200059e6000546001600160a01b031690565b600162000981565b620005b330600162000981565b608051620005c390600162000981565b620005e2620005da6000546001600160a01b031690565b6001620009ef565b620005ef306001620009ef565b608051620005ff906001620009ef565b62000629620006166000546001600160a01b031690565b6b033b2e3c9fd0803ce800000062000a56565b600b54612710906200063a60115490565b62000646919062000d20565b62000652919062000d42565b600f55600c54612710906200066660115490565b62000672919062000d20565b6200067e919062000d42565b6010555062000db992505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60005b81518160ff1610156200075157600160166000848460ff16815181106200070a576200070a62000d65565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580620007488162000d7b565b915050620006df565b5050565b6001600160a01b0382166000908152600e602052604090205460ff1615158115151415620007c65760405162461bcd60e51b815260206004820152601e60248201527f4469676974733a20414d4d20706169722069732073616d652076616c756500006044820152606401620000c9565b6001600160a01b0382166000908152600e60205260409020805460ff191682158015919091179091556200085c5760805160405162241fbd60e51b81526001600160a01b0384811660048301526001602483015290911690630483f7a090604401600060405180830381600087803b1580156200084257600080fd5b505af115801562000857573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6000546001600160a01b031690565b620008b162000b3b565b6001600160a01b03821660009081526015602052604090205460ff1615158115151415620009225760405162461bcd60e51b815260206004820152601860248201527f4469676974733a2073616d652073746174652076616c756500000000000000006044820152606401620000c9565b6001600160a01b038216600081815260156020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b6200098b62000b3b565b6001600160a01b038216600081815260176020908152604091829020805460ff19168515159081179091558251938452908301527fc5e00cfc9494c002f5a5ecb735339bf61c88d0e9340bbe76d10bb5f0e48e6f8591015b60405180910390a15050565b620009f962000b3b565b6001600160a01b038216600081815260186020908152604091829020805460ff19168515159081179091558251938452908301527f4a8452f723db48bf05f301f94d62a2cf7a72976cde77d83e3646584858b8f4b29101620009e3565b6001600160a01b03821662000aae5760405162461bcd60e51b815260206004820181905260248201527f4469676974733a206d696e7420746f20746865207a65726f20616464726573736044820152606401620000c9565b806011600082825462000ac2919062000d9e565b90915550506001600160a01b0382166000908152601360205260408120805483929062000af190849062000d9e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000546001600160a01b0316331462000b975760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401620000c9565b565b611e458062003d7e83390190565b80516001600160a01b038116811462000bbf57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121562000bf157600080fd5b62000bfc8562000ba7565b9350602062000c0d81870162000ba7565b935062000c1d6040870162000ba7565b60608701519093506001600160401b038082111562000c3b57600080fd5b818801915088601f83011262000c5057600080fd5b81518181111562000c655762000c6562000bc4565b8060051b604051601f19603f8301168101818110858211171562000c8d5762000c8d62000bc4565b60405291825284820192508381018501918b83111562000cac57600080fd5b938501935b8285101562000cd55762000cc58562000ba7565b8452938501939285019262000cb1565b989b979a50959850505050505050565b60006020828403121562000cf857600080fd5b62000d038262000ba7565b9392505050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161562000d3d5762000d3d62000d0a565b500290565b60008262000d6057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81141562000d955762000d9562000d0a565b60010192915050565b6000821982111562000db45762000db462000d0a565b500190565b60805160a05160c051612f2c62000e52600039600081816108c001528181610b2a01528181611e1b015281816123b001526124a50152600081816104640152611ee40152600081816104a60152818161091801528181610c16015281816110fa015281816112d701528181611504015281816118bb01528181612087015281816121340152818161228a01526128130152612f2c6000f3fe608060405234801561001057600080fd5b50600436106103ba5760003560e01c8063715018a6116101f4578063b80b6e891161011a578063e01af92c116100ad578063f1b234ad1161007c578063f1b234ad14610895578063f2fde38b146108a8578063f4b9fa75146108bb578063f69e2046146108e257600080fd5b8063e01af92c1461085d578063e2f4560514610870578063e4956ce214610879578063ebbf1ace1461088c57600080fd5b8063c9567bf9116100e9578063c9567bf9146107f6578063d2fcc001146107fe578063d4c989d314610811578063dd62ed3e1461082457600080fd5b8063b80b6e89146107b4578063c0246668146107bd578063c6af580b146107d0578063c705c569146107e357600080fd5b80639e252f0011610192578063aa4e8c4a11610161578063aa4e8c4a14610758578063b199efb51461076b578063b262b9ae1461077e578063b62496f51461079157600080fd5b80639e252f001461070c578063a457c2d71461071f578063a8b9d24014610732578063a9059cbb1461074557600080fd5b8063870bd30b116101ce578063870bd30b146106b25780638da5cb5b146106c657806395d89b41146106d75780639a7a23d6146106f957600080fd5b8063715018a61461068e578063744d15911461069657806375f0a8741461069f57600080fd5b80633d12a0db116102e45780635937ea6c1161027757806368c51e351161024657806368c51e35146106135780636dd3d39f146106265780636ddd17131461065257806370a082311461066557600080fd5b80635937ea6c146105b85780635b65b9ab146105c15780635e843ad2146105d4578063658c27a9146105e757600080fd5b80634e71d92d116102b35780634e71d92d146105685780634fbee1931461057057806351ee26ae1461059c57806357777d31146105af57600080fd5b80633d12a0db14610523578063433efbc61461053557806347535d7b1461054857806349bd5a5e1461055557600080fd5b806323b872dd1161035c57806333f3d6281161032b57806333f3d628146104ec57806337eb1528146104ff57806339509351146105085780633b279ca91461051b57600080fd5b806323b872dd1461048e5780632c1f5216146104a15780632f4504ae146104c8578063313ce567146104dd57600080fd5b8063095ea7b311610398578063095ea7b3146104255780630dd87157146104485780631694505e1461045f57806318160ddd1461048657600080fd5b806303fd2a45146103bf5780630483f7a0146103e557806306fdde03146103fa575b600080fd5b6103c861dead81565b6040516001600160a01b0390911681526020015b60405180910390f35b6103f86103f3366004612c2c565b6108ea565b005b60408051808201909152600681526544696769747360d01b60208201525b6040516103dc9190612c93565b610438610433366004612cc6565b610979565b60405190151581526020016103dc565b610451600a5481565b6040519081526020016103dc565b6103c87f000000000000000000000000000000000000000000000000000000000000000081565b601154610451565b61043861049c366004612cf0565b61098f565b6103c87f000000000000000000000000000000000000000000000000000000000000000081565b600d5461043890640100000000900460ff1681565b604051601281526020016103dc565b6103f86104fa366004612cc6565b610a36565b61045160085481565b610438610516366004612cc6565b610a56565b6103f8610a8d565b600d5461043890610100900460ff1681565b6002546103c8906001600160a01b031681565b600d546104389060ff1681565b6004546103c8906001600160a01b031681565b6103f8610c0a565b61043861057e366004612d2c565b6001600160a01b031660009081526015602052604090205460ff1690565b6103f86105aa366004612d2c565b610cef565b610451600b5481565b61045160055481565b6103f86105cf366004612d47565b610d6f565b6103f86105e2366004612d73565b610e53565b6104386105f5366004612d2c565b6001600160a01b031660009081526017602052604090205460ff1690565b6103f8610621366004612db5565b610ecb565b610438610634366004612d2c565b6001600160a01b031660009081526018602052604090205460ff1690565b600d546104389062010000900460ff1681565b610451610673366004612d2c565b6001600160a01b031660009081526013602052604090205490565b6103f8610f92565b610451600c5481565b6003546103c8906001600160a01b031681565b600d54610438906301000000900460ff1681565b6000546001600160a01b03166103c8565b60408051808201909152600681526544494749545360d01b6020820152610418565b6103f8610707366004612c2c565b610fa6565b6103f861071a366004612db5565b611016565b61043861072d366004612cc6565b61104b565b610451610740366004612d2c565b6110d8565b610438610753366004612cc6565b61116d565b6103f8610766366004612db5565b61117a565b6001546103c8906001600160a01b031681565b6103f861078c366004612d2c565b61123a565b61043861079f366004612d2c565b600e6020526000908152604090205460ff1681565b61045160075481565b6103f86107cb366004612c2c565b6113b7565b6103f86107de366004612dce565b61148d565b6104386107f1366004612d2c565b6114e2565b6103f8611571565b6103f861080c366004612c2c565b611588565b6103f861081f366004612c2c565b6115f4565b610451610832366004612deb565b6001600160a01b03918216600090815260146020908152604080832093909416825291909152205490565b6103f861086b366004612dce565b611658565b61045160095481565b6103f8610887366004612dce565b6116ab565b61045160065481565b6103f86108a3366004612deb565b611702565b6103f86108b6366004612d2c565b6117df565b6103c87f000000000000000000000000000000000000000000000000000000000000000081565b6103f8611855565b6108f261199a565b60405162241fbd60e51b81526001600160a01b03838116600483015282151560248301527f00000000000000000000000000000000000000000000000000000000000000001690630483f7a0906044015b600060405180830381600087803b15801561095d57600080fd5b505af1158015610971573d6000803e3d6000fd5b505050505050565b60006109863384846119f4565b50600192915050565b600061099c848484611b01565b6001600160a01b038416600090815260146020908152604080832033845290915290205482811015610a155760405162461bcd60e51b815260206004820152601d60248201527f4469676974733a20747820616d6f756e74203e20616c6c6f77616e636500000060448201526064015b60405180910390fd5b610a298533610a248685612e34565b6119f4565b60019150505b9392505050565b610a3e61199a565b610a526001600160a01b03831633836121e9565b5050565b3360008181526014602090815260408083206001600160a01b03871684529091528120549091610986918590610a24908690612e4b565b6002546001600160a01b03163314610ae75760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c792063616c6c61626c65206279204d756c7469526577617264730000006044820152606401610a0c565b6001546001600160a01b03166000908152601360205260408120546001546040516370a0823160e01b81526001600160a01b0391821660048201529192506000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b979190612e63565b600954600d549192508310159062010000900460ff168015610bb65750805b8015610bc5575060125460ff16155b15610c05576012805460ff19166001179055600d54610100900460ff16610bec5760095492505b610bf6838361223b565b42600a556012805460ff191690555b505050565b60006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663807ab4f7336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af1158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca69190612e7c565b905080610cec5760405162461bcd60e51b8152602060048201526014602482015273111a59da5d1cce8818db185a5b4819985a5b195960621b6044820152606401610a0c565b50565b610cf761199a565b6001600160a01b038116610d4d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207365742061646472657373207a65726f0000000000000000006044820152606401610a0c565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610d7761199a565b6103208311158015610d8b57506103208211155b8015610d9957506103208111155b610de55760405162461bcd60e51b815260206004820152601960248201527f4561636820666565206d7573742062652062656c6f77203825000000000000006044820152606401610a0c565b60058390556006829055600781905580610dff8385612e4b565b610e099190612e4b565b60085560408051848152602081018490529081018290527fe45758128ecb3f05f169ba1786802a05cda7e2f59e3d82ad3b4b0edca93052fb906060015b60405180910390a1505050565b610e5b61199a565b600d8054600984905562ffff0019166201000085151590810261ff001916919091176101008415159081029190911790925560408051918252602082018590528101919091527fab295b2154555078d638d8a755641a34fb91406a5da5d6df445b7d9cb266335190606001610e46565b610ed361199a565b60648110158015610ee657506127108111155b610f325760405162461bcd60e51b815260206004820152601e60248201527f425053206f6e6c79206265747765656e2031303020616e6420313030303000006044820152606401610a0c565b600c81905561271081610f4460115490565b610f4e9190612e99565b610f589190612eb8565b6010556040518181527f316ed3138666535a35a7c9226c9a5e90b681761e8721a2d3d389991bf57b5e58906020015b60405180910390a150565b610f9a61199a565b610fa46000612702565b565b610fae61199a565b6004546001600160a01b038381169116141561100c5760405162461bcd60e51b815260206004820152601d60248201527f4469676974733a204c502063616e206e6f742062652072656d6f7665640000006044820152606401610a0c565b610a528282612752565b61101e61199a565b604051339082156108fc029083906000818181858888f19350505050158015610a52573d6000803e3d6000fd5b3360009081526014602090815260408083206001600160a01b0386168452909152812054828110156110bf5760405162461bcd60e51b815260206004820152601f60248201527f4469676974733a2064656372656173656420616c6c6f77616e6365203c2030006044820152606401610a0c565b6110ce3385610a248685612e34565b5060019392505050565b6040516302a2e74960e61b81526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063a8b9d24090602401602060405180830381865afa158015611143573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612e63565b92915050565b6000610986338484611b01565b61118261199a565b6031811015801561119557506127108111155b6111e15760405162461bcd60e51b815260206004820152601d60248201527f425053206f6e6c79206265747765656e20343920616e642031303030300000006044820152606401610a0c565b600b819055612710816111f360115490565b6111fd9190612e99565b6112079190612eb8565b600f556040518181527f64646f2003ab075c131ee5bde4e6dc9f26132c79b2f7924156e1138d8b5f7b7d90602001610f87565b61124261199a565b6001546001600160a01b03161561129b5760405162461bcd60e51b815260206004820181905260248201527f4469676974733a20746f6b656e53746f7261676520616c7265616479207365746044820152606401610a0c565b600180546001600160a01b0319166001600160a01b03838116918217835560405162241fbd60e51b8152600481019290925260248201929092527f000000000000000000000000000000000000000000000000000000000000000090911690630483f7a090604401600060405180830381600087803b15801561131d57600080fd5b505af1158015611331573d6000803e3d6000fd5b50506001805461134c93506001600160a01b031691506113b7565b60018054611365916001600160a01b03909116906115f4565b6001805461137e916001600160a01b0390911690611588565b6040516001600160a01b03821681527f025fd4b5632bc2c19c0ecc34263ec81897a3f85327e09b0344dd2d16b384110890602001610f87565b6113bf61199a565b6001600160a01b03821660009081526015602052604090205460ff161515811515141561142e5760405162461bcd60e51b815260206004820152601860248201527f4469676974733a2073616d652073746174652076616c756500000000000000006044820152606401610a0c565b6001600160a01b038216600081815260156020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b61149561199a565b600d805482151563010000000263ff000000199091161790556040517f5bb2376cf656637e70e36c01d3da25685bf3b353f18681b8a5e48c7b2effe13390610f8790831515815260200190565b60405163c705c56960e01b81526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063c705c56990602401602060405180830381865afa15801561154d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612e7c565b61157961199a565b600d805460ff19166001179055565b61159061199a565b6001600160a01b038216600081815260186020908152604091829020805460ff19168515159081179091558251938452908301527f4a8452f723db48bf05f301f94d62a2cf7a72976cde77d83e3646584858b8f4b291015b60405180910390a15050565b6115fc61199a565b6001600160a01b038216600081815260176020908152604091829020805460ff19168515159081179091558251938452908301527fc5e00cfc9494c002f5a5ecb735339bf61c88d0e9340bbe76d10bb5f0e48e6f8591016115e8565b61166061199a565b600d8054821515620100000262ff0000199091161790556040517fb9bbb15e341600c8d067a0cadeba219905d5ba6d422b193c9c32265d26fc51c890610f8790831515815260200190565b6116b361199a565b600d80548215156401000000000264ff00000000199091161790556040517f341322866a3a2c26c27efa4c270c5ba86f6963257118897dd8196f224c002d4390610f8790831515815260200190565b61170a61199a565b6001600160a01b0382166117505760405162461bcd60e51b815260206004820152600d60248201526c4469676974733a207a65726f2160981b6044820152606401610a0c565b6001600160a01b0381166117965760405162461bcd60e51b815260206004820152600d60248201526c4469676974733a207a65726f2160981b6044820152606401610a0c565b600380546001600160a01b0319166001600160a01b0384811691909117909155600154604051630a5bc28360e21b8152838316600482015291169063296f0a0c90602401610943565b6117e761199a565b6001600160a01b03811661184c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a0c565b610cec81612702565b600d54640100000000900460ff166118af5760405162461bcd60e51b815260206004820152601f60248201527f4469676974733a20636f6d706f756e64696e67206e6f7420656e61626c6564006044820152606401610a0c565b60006001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016636de1a5a9336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af1158015611927573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194b9190612e7c565b905080610cec5760405162461bcd60e51b815260206004820152601a60248201527f4469676974733a20636f6d706f756e64696e67206661696c65640000000000006044820152606401610a0c565b6000546001600160a01b03163314610fa45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a0c565b6001600160a01b038316611a4a5760405162461bcd60e51b815260206004820152601e60248201527f4469676974733a20617070726f76652066726f6d2030206164647265737300006044820152606401610a0c565b6001600160a01b038216611aa05760405162461bcd60e51b815260206004820152601c60248201527f4469676974733a20617070726f766520746f20302061646472657373000000006044820152606401610a0c565b6001600160a01b0383811660008181526014602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600d5460ff1680611b1f57506000546001600160a01b038481169116145b80611b3757506000546001600160a01b038381169116145b80611b5a57506001600160a01b03831660009081526016602052604090205460ff165b80611b7d57506001600160a01b03821660009081526016602052604090205460ff165b611bb45760405162461bcd60e51b81526020600482015260086024820152672737ba1027b832b760c11b6044820152606401610a0c565b6001600160a01b038316611c0a5760405162461bcd60e51b815260206004820152601f60248201527f4469676974733a207472616e736665722066726f6d20302061646472657373006044820152606401610a0c565b6001600160a01b038216611c605760405162461bcd60e51b815260206004820152601d60248201527f4469676974733a207472616e7366657220746f203020616464726573730000006044820152606401610a0c565b600f5481111580611c8957506001600160a01b03831660009081526017602052604090205460ff165b611cc95760405162461bcd60e51b8152602060048201526011602482015270151608131a5b5a5d08115e18d959591959607a1b6044820152606401610a0c565b6000546001600160a01b03848116911614801590611cf057506001600160a01b0382163014155b8015611d0757506001600160a01b03821661dead14155b8015611d2157506004546001600160a01b03838116911614155b15611d6f576001600160a01b03821660009081526013602090815260408083205460189092529091205460ff1680611d645750601054611d618383612e4b565b11155b611d6d57600080fd5b505b6001600160a01b03831660009081526013602052604090205481811015611dd85760405162461bcd60e51b815260206004820181905260248201527f4469676974733a207472616e7366657220657863656564732062616c616e63656044820152606401610a0c565b6001546001600160a01b03166000908152601360205260408120546001546040516370a0823160e01b81526001600160a01b0391821660048201529192506000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015611e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e889190612e63565b600954600d549192508310159062010000900460ff168015611ea75750805b8015611eb6575060125460ff16155b8015611edb57506001600160a01b0387166000908152600e602052604090205460ff16155b8015611f1957507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316876001600160a01b031614155b8015611f3357506000546001600160a01b03888116911614155b8015611f4d57506000546001600160a01b03878116911614155b15611f8d576012805460ff19166001179055600d54610100900460ff16611f745760095492505b611f7e838361223b565b42600a556012805460ff191690555b6004546000906001600160a01b0389811691161480611fb957506004546001600160a01b038881169116145b15611fc2575060015b6001600160a01b03881660009081526015602052604090205460ff168061200157506001600160a01b03871660009081526015602052604090205460ff165b1561200a575060005b60125460ff16806120255750600d546301000000900460ff16155b1561202e575060005b801561207a576000612710600854886120479190612e99565b6120519190612eb8565b905061205d8188612e34565b600154909750612078908a906001600160a01b0316836128ac565b505b6120858888886128ac565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e30443bc896120d48b6001600160a01b031660009081526013602052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561211a57600080fd5b505af115801561212e573d6000803e3d6000fd5b505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e30443bc886121818a6001600160a01b031660009081526013602052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156121c757600080fd5b505af11580156121db573d6000803e3d6000fd5b505050505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c059084906129af565b81612244575050565b6003546000906001600160a01b03161580159061226357506000600854115b15612285576008546005546122789085612e99565b6122829190612eb8565b90505b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230a9190612e63565b11801561231957506000600854115b1561233b5760085460075461232e9086612e99565b6123389190612eb8565b90505b6000816123488487612e34565b6123529190612e34565b90506000612361600283612eb8565b9050600061236f8284612e34565b905060008261237e8688612e4b565b6123889190612e4b565b6001546040516370a0823160e01b81526001600160a01b0391821660048201529192506000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa1580156123f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061241d9190612e63565b60015460405163294a237b60e21b8152600481018590529192506001600160a01b03169063a5288dec90602401600060405180830381600087803b15801561246457600080fd5b505af1158015612478573d6000803e3d6000fd5b50506001546040516370a0823160e01b81526001600160a01b039182166004820152600093508b925084917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa1580156124ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125109190612e63565b61251a9190612e34565b6125249190612e4b565b90506000836125338a84612e99565b61253d9190612eb8565b905060008461254c8a85612e99565b6125569190612eb8565b90506000816125658486612e34565b61256f9190612e34565b905082156125e05760015460035460405163f48b39dd60e01b81526001600160a01b0391821660048201526024810186905291169063f48b39dd90604401600060405180830381600087803b1580156125c757600080fd5b505af11580156125db573d6000803e3d6000fd5b505050505b600154604051634e6a20ed60e11b815260048101899052602481018390526001600160a01b0390911690639cd441da90604401600060405180830381600087803b15801561262d57600080fd5b505af1158015612641573d6000803e3d6000fd5b5050604080518b8152602081018590529081018a90527fb63dc6f50047533abe2d6adf180d38d524c8d98e55ad199aac8d6b9801bbe24a9250606001905060405180910390a181156126f35760015460405163757e4b5b60e01b8152600481018c9052602481018490526001600160a01b039091169063757e4b5b90604401600060405180830381600087803b1580156126da57600080fd5b505af11580156126ee573d6000803e3d6000fd5b505050505b50505050505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166000908152600e602052604090205460ff16151581151514156127c15760405162461bcd60e51b815260206004820152601e60248201527f4469676974733a20414d4d20706169722069732073616d652076616c756500006044820152606401610a0c565b6001600160a01b0382166000908152600e60205260409020805460ff191682158015919091179091556128705760405162241fbd60e51b81526001600160a01b038381166004830152600160248301527f00000000000000000000000000000000000000000000000000000000000000001690630483f7a090604401600060405180830381600087803b15801561285757600080fd5b505af115801561286b573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b038316600090815260136020526040902054818110156129155760405162461bcd60e51b815260206004820152601b60248201527f4469676974733a20747820616d6f756e74203e2062616c616e636500000000006044820152606401610a0c565b61291f8282612e34565b6001600160a01b038086166000908152601360205260408082209390935590851681529081208054849290612955908490612e4b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129a191815260200190565b60405180910390a350505050565b6000612a04826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a819092919063ffffffff16565b805190915015610c055780806020019051810190612a229190612e7c565b610c055760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a0c565b6060612a908484600085612a98565b949350505050565b606082471015612af95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a0c565b6001600160a01b0385163b612b505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a0c565b600080866001600160a01b03168587604051612b6c9190612eda565b60006040518083038185875af1925050503d8060008114612ba9576040519150601f19603f3d011682016040523d82523d6000602084013e612bae565b606091505b5091509150612bbe828286612bc9565b979650505050505050565b60608315612bd8575081610a2f565b825115612be85782518084602001fd5b8160405162461bcd60e51b8152600401610a0c9190612c93565b80356001600160a01b0381168114612c1957600080fd5b919050565b8015158114610cec57600080fd5b60008060408385031215612c3f57600080fd5b612c4883612c02565b91506020830135612c5881612c1e565b809150509250929050565b60005b83811015612c7e578181015183820152602001612c66565b83811115612c8d576000848401525b50505050565b6020815260008251806020840152612cb2816040850160208701612c63565b601f01601f19169190910160400192915050565b60008060408385031215612cd957600080fd5b612ce283612c02565b946020939093013593505050565b600080600060608486031215612d0557600080fd5b612d0e84612c02565b9250612d1c60208501612c02565b9150604084013590509250925092565b600060208284031215612d3e57600080fd5b610a2f82612c02565b600080600060608486031215612d5c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215612d8857600080fd5b8335612d9381612c1e565b9250602084013591506040840135612daa81612c1e565b809150509250925092565b600060208284031215612dc757600080fd5b5035919050565b600060208284031215612de057600080fd5b8135610a2f81612c1e565b60008060408385031215612dfe57600080fd5b612e0783612c02565b9150612e1560208401612c02565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015612e4657612e46612e1e565b500390565b60008219821115612e5e57612e5e612e1e565b500190565b600060208284031215612e7557600080fd5b5051919050565b600060208284031215612e8e57600080fd5b8151610a2f81612c1e565b6000816000190483118215151615612eb357612eb3612e1e565b500290565b600082612ed557634e487b7160e01b600052601260045260246000fd5b500490565b60008251612eec818460208701612c63565b919091019291505056fea2646970667358221220174991cdf6cd29124380b3dcc35d21bb5b091e0d29e637aad70a1c790958d47264736f6c634300080a003360e06040523480156200001157600080fd5b5060405162001e4538038062001e458339810160408190526200003491620001be565b6200003f3362000151565b6001600160a01b0383166200008e5760405162461bcd60e51b815260206004820152601060248201526f4441492061646472657373207a65726f60801b60448201526064015b60405180910390fd5b6001600160a01b038216620000db5760405162461bcd60e51b8152602060048201526012602482015271546f6b656e2061646472657373207a65726f60701b604482015260640162000085565b6001600160a01b038116620001335760405162461bcd60e51b815260206004820152601b60248201527f556e697377617020726f757465722061646472657373207a65726f0000000000604482015260640162000085565b6001600160a01b0392831660805290821660a0521660c05262000208565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620001b957600080fd5b919050565b600080600060608486031215620001d457600080fd5b620001df84620001a1565b9250620001ef60208501620001a1565b9150620001ff60408501620001a1565b90509250925092565b60805160a05160c051611bc76200027e6000396000818161025201528181610e250152610ede0152600081816103bf015281816105d701528181610d3d01528181610da30152610fae0152600081816104b4015281816107e701528181610ce901528181610e5701526111920152611bc76000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c8063807ab4f711610104578063a8b9d240116100a2578063dd62ed3e11610071578063dd62ed3e1461047b578063e30443bc14610489578063f2fde38b1461049c578063f4b9fa75146104af57600080fd5b8063a8b9d24014610413578063a9059cbb1461022a578063aafd847a14610426578063c705c5691461044f57600080fd5b806395d89b41116100de57806395d89b41146101e95780639d76ea58146103ba5780639e1e0661146103e1578063a680e0bc146103ea57600080fd5b8063807ab4f71461038d57806385a6b3ae146103a05780638da5cb5b146103a957600080fd5b8063313ce567116101715780636de1a5a91161014b5780636de1a5a91461030457806370a0823114610317578063715018a6146103405780637b510fe81461034857600080fd5b8063313ce567146102bf5780633243c791146102ce5780634e7b827f146102e157600080fd5b80631694505e116101ad5780631694505e1461024d57806318160ddd1461028c57806323b872dd1461029e57806327ce0147146102ac57600080fd5b80630483f7a0146101d457806306fdde03146101e9578063095ea7b31461022a575b600080fd5b6101e76101e236600461176e565b6104d6565b005b60408051808201825260168152752234b3b4ba39afa234bb34b232b7322a3930b1b5b2b960511b6020820152905161022191906117d1565b60405180910390f35b61023d610238366004611804565b6106bc565b6040519015158152602001610221565b6102747f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610221565b6005545b604051908152602001610221565b61023d61023836600461182e565b6102906102ba36600461186a565b61071e565b60405160128152602001610221565b6101e76102dc366004611885565b610782565b61023d6102ef36600461186a565b60036020526000908152604090205460ff1681565b61023d61031236600461186a565b61088a565b61029061032536600461186a565b6001600160a01b031660009081526006602052604090205490565b6101e7610916565b61035b61035636600461186a565b61092a565b604080516001600160a01b0390961686526020860194909452928401919091526060830152608082015260a001610221565b61023d61039b36600461186a565b610980565b61029060015481565b6000546001600160a01b0316610274565b6102747f000000000000000000000000000000000000000000000000000000000000000081565b61029060025481565b6102906103f836600461186a565b6001600160a01b031660009081526009602052604090205490565b61029061042136600461186a565b610a04565b61029061043436600461186a565b6001600160a01b031660009081526008602052604090205490565b61023d61045d36600461186a565b6001600160a01b031660009081526003602052604090205460ff1690565b61029061023836600461189e565b6101e7610497366004611804565b610a36565b6101e76104aa36600461186a565b610a8d565b6102747f000000000000000000000000000000000000000000000000000000000000000081565b6104de610b03565b6001600160a01b03821660009081526003602052604090205460ff16151581151514156105785760405162461bcd60e51b815260206004820152603e60248201527f4469676974735f4469766964656e64547261636b65723a206163636f756e742060448201527f616c72656164792073657420746f20726571756573746564207374617465000060648201526084015b60405180910390fd5b6001600160a01b0382166000908152600360205260409020805460ff191682158015919091179091556105b5576105b0826000610b5d565b610673565b6040516370a0823160e01b81526001600160a01b0383811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064491906118d1565b905069021e19e0c9bab24000008110610666576106618382610b5d565b610671565b610671836000610b5d565b505b816001600160a01b03167fa3c7c11b2e12c4144b09a7813f3393ba646392788638998c97be8da908cf04be826040516106b0911515815260200190565b60405180910390a25050565b60405162461bcd60e51b815260206004820152602e60248201527f4469676974735f4469766964656e64547261636b65723a206d6574686f64206e60448201526d1bdd081a5b5c1b195b595b9d195960921b606482015260009060840161056f565b6001600160a01b038116600090815260066020526040812054600454829161074591611900565b6001600160a01b038416600090815260076020526040902054909150600160801b610770828461191f565b61077a9190611960565b949350505050565b6000600554116107d45760405162461bcd60e51b815260206004820152601960248201527f6469766964656e647320756e617661696c61626c652079657400000000000000604482015260640161056f565b80156108875761080f6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084610bc1565b600554610820600160801b83611900565b61082a9190611960565b6004546108379190611982565b60045560405181815233907fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d784541165119060200160405180910390a280600160008282546108819190611982565b90915550505b50565b6000610894610b03565b6000806108a084610c2c565b9092509050811561090a576001600160a01b03841660008181526009602090815260409182902042905581518581529081018490527f0e311a2c6dbfb0153ec3a8a5bdca09070b3e5f60768fdc10a20453f38d186873910160405180910390a25060019392505050565b6000925050505b919050565b61091e610b03565b610928600061109d565b565b60008060008060008061093c87610a04565b905060006109498861071e565b6001600160a01b038916600090815260096020908152604080832054600890925290912054999a9399919850965094509092505050565b600061098a610b03565b6000610995836110ed565b905080156109fb576001600160a01b03831660008181526009602052604090819020429055517f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906109ea9084815260200190565b60405180910390a250600192915050565b50600092915050565b6001600160a01b038116600090815260086020526040812054610a268361071e565b610a30919061199a565b92915050565b610a3e610b03565b6001600160a01b03821660009081526003602052604090205460ff1615610a63575050565b69021e19e0c9bab24000008110610a8257610a7e8282610b5d565b5050565b610a7e826000610b5d565b610a95610b03565b6001600160a01b038116610afa5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161056f565b6108878161109d565b6000546001600160a01b031633146109285760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161056f565b6001600160a01b03821660009081526006602052604090205480821115610b9c576000610b8a828461199a565b9050610b9684826111b9565b50505050565b80821015610bbc576000610bb0838361199a565b9050610b9684826112fe565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b969085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526114c4565b6000806000610c3a84610a04565b90508015611091576001600160a01b03841660009081526008602052604081208054839290610c6a908490611982565b925050819055508060026000828254610c839190611982565b90915550506040518181526001600160a01b038516907fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d9060200160405180910390a26040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110610d1b57610d1b6119b1565b60200260200101906001600160a01b031690816001600160a01b0316815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610d6f57610d6f6119b1565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81528682166004820152600091829182917f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610dea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0e91906118d1565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018890529192507f00000000000000000000000000000000000000000000000000000000000000009091169063095ea7b3906044016020604051808303816000875af1158015610ea2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec691906119c7565b50604051635c11d79560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635c11d79590610f1c90889060009089908e9042906004016119e4565b600060405180830381600087803b158015610f3657600080fd5b505af1925050508015610f47575060015b610f8957610f53611a55565b806308c379a01415610f7d5750610f68611aac565b80610f735750610f7f565b6000935050611028565b505b3d6000803e3d6000fd5b6040516370a0823160e01b81526001600160a01b0389811660048301526001945082917f0000000000000000000000000000000000000000000000000000000000000000909116906370a0823190602401602060405180830381865afa158015610ff7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061101b91906118d1565b611025919061199a565b91505b82611083576001600160a01b0388166000908152600860205260408120805487929061105590849061199a565b92505081905550846002600082825461106e919061199a565b909155506000998a9950975050505050505050565b509296929550919350505050565b50600093849350915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806110f983610a04565b905080156109fb576001600160a01b03831660009081526008602052604081208054839290611129908490611982565b9250508190555080600260008282546111429190611982565b90915550506040518181526001600160a01b038416907fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d9060200160405180910390a2610a306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483611596565b6001600160a01b0382166112285760405162461bcd60e51b815260206004820152603060248201527f4469676974735f4469766964656e64547261636b65723a206d696e7420746f2060448201526f746865207a65726f206164647265737360801b606482015260840161056f565b806005600082825461123a9190611982565b90915550506001600160a01b03821660009081526006602052604081208054839290611267908490611982565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3806004546112bb9190611900565b6001600160a01b0383166000908152600760205260409020546112de9190611b36565b6001600160a01b0390921660009081526007602052604090209190915550565b6001600160a01b03821661136f5760405162461bcd60e51b815260206004820152603260248201527f4469676974735f4469766964656e64547261636b65723a206275726e2066726f6044820152716d20746865207a65726f206164647265737360701b606482015260840161056f565b6001600160a01b038216600090815260066020526040902054818110156113f45760405162461bcd60e51b815260206004820152603360248201527f4469676974735f4469766964656e64547261636b65723a206275726e20616d6f604482015272756e7420657863656564732062616c616e636560681b606482015260840161056f565b6113fe828261199a565b6001600160a01b0384166000908152600660205260408120919091556005805484929061142c90849061199a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3816004546114809190611900565b6001600160a01b0384166000908152600760205260409020546114a3919061191f565b6001600160a01b039093166000908152600760205260409020929092555050565b6000611519826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166115c69092919063ffffffff16565b805190915015610bbc578080602001905181019061153791906119c7565b610bbc5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161056f565b6040516001600160a01b038316602482015260448101829052610bbc90849063a9059cbb60e01b90606401610bf5565b60606115d584846000856115df565b90505b9392505050565b6060824710156116405760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161056f565b6001600160a01b0385163b6116975760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161056f565b600080866001600160a01b031685876040516116b39190611b75565b60006040518083038185875af1925050503d80600081146116f0576040519150601f19603f3d011682016040523d82523d6000602084013e6116f5565b606091505b5091509150611705828286611710565b979650505050505050565b6060831561171f5750816115d8565b82511561172f5782518084602001fd5b8160405162461bcd60e51b815260040161056f91906117d1565b80356001600160a01b038116811461091157600080fd5b801515811461088757600080fd5b6000806040838503121561178157600080fd5b61178a83611749565b9150602083013561179a81611760565b809150509250929050565b60005b838110156117c05781810151838201526020016117a8565b83811115610b965750506000910152565b60208152600082518060208401526117f08160408501602087016117a5565b601f01601f19169190910160400192915050565b6000806040838503121561181757600080fd5b61182083611749565b946020939093013593505050565b60008060006060848603121561184357600080fd5b61184c84611749565b925061185a60208501611749565b9150604084013590509250925092565b60006020828403121561187c57600080fd5b6115d882611749565b60006020828403121561189757600080fd5b5035919050565b600080604083850312156118b157600080fd5b6118ba83611749565b91506118c860208401611749565b90509250929050565b6000602082840312156118e357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561191a5761191a6118ea565b500290565b600080821280156001600160ff1b0384900385131615611941576119416118ea565b600160ff1b839003841281161561195a5761195a6118ea565b50500190565b60008261197d57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611995576119956118ea565b500190565b6000828210156119ac576119ac6118ea565b500390565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156119d957600080fd5b81516115d881611760565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a345784516001600160a01b031683529383019391830191600101611a0f565b50506001600160a01b03969096166060850152505050608001529392505050565b600060033d1115611a6e5760046000803e5060005160e01c5b90565b601f8201601f1916810167ffffffffffffffff81118282101715611aa557634e487b7160e01b600052604160045260246000fd5b6040525050565b600060443d1015611aba5790565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715611aea57505050505090565b8285019150815181811115611b025750505050505090565b843d8701016020828501011115611b1c5750505050505090565b611b2b60208286010187611a71565b509095945050505050565b60008083128015600160ff1b850184121615611b5457611b546118ea565b6001600160ff1b0384018313811615611b6f57611b6f6118ea565b50500390565b60008251611b878184602087016117a5565b919091019291505056fea26469706673582212203f00d34d83f57e427717ab4c27d56dabc66e52567f6aa417581f96b32f0e0f6c64736f6c634300080a00330000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000c1a3e4e1c3da4c89582dfa1afa87a1853d7f78f000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030000000000000000000000006fd99eb139e942d5b6aa3827d9725e3413e76ea3000000000000000000000000d152f549545093347a162dce210e7293f14521500000000000000000000000000c1a3e4e1c3da4c89582dfa1afa87a1853d7f78f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103ba5760003560e01c8063715018a6116101f4578063b80b6e891161011a578063e01af92c116100ad578063f1b234ad1161007c578063f1b234ad14610895578063f2fde38b146108a8578063f4b9fa75146108bb578063f69e2046146108e257600080fd5b8063e01af92c1461085d578063e2f4560514610870578063e4956ce214610879578063ebbf1ace1461088c57600080fd5b8063c9567bf9116100e9578063c9567bf9146107f6578063d2fcc001146107fe578063d4c989d314610811578063dd62ed3e1461082457600080fd5b8063b80b6e89146107b4578063c0246668146107bd578063c6af580b146107d0578063c705c569146107e357600080fd5b80639e252f0011610192578063aa4e8c4a11610161578063aa4e8c4a14610758578063b199efb51461076b578063b262b9ae1461077e578063b62496f51461079157600080fd5b80639e252f001461070c578063a457c2d71461071f578063a8b9d24014610732578063a9059cbb1461074557600080fd5b8063870bd30b116101ce578063870bd30b146106b25780638da5cb5b146106c657806395d89b41146106d75780639a7a23d6146106f957600080fd5b8063715018a61461068e578063744d15911461069657806375f0a8741461069f57600080fd5b80633d12a0db116102e45780635937ea6c1161027757806368c51e351161024657806368c51e35146106135780636dd3d39f146106265780636ddd17131461065257806370a082311461066557600080fd5b80635937ea6c146105b85780635b65b9ab146105c15780635e843ad2146105d4578063658c27a9146105e757600080fd5b80634e71d92d116102b35780634e71d92d146105685780634fbee1931461057057806351ee26ae1461059c57806357777d31146105af57600080fd5b80633d12a0db14610523578063433efbc61461053557806347535d7b1461054857806349bd5a5e1461055557600080fd5b806323b872dd1161035c57806333f3d6281161032b57806333f3d628146104ec57806337eb1528146104ff57806339509351146105085780633b279ca91461051b57600080fd5b806323b872dd1461048e5780632c1f5216146104a15780632f4504ae146104c8578063313ce567146104dd57600080fd5b8063095ea7b311610398578063095ea7b3146104255780630dd87157146104485780631694505e1461045f57806318160ddd1461048657600080fd5b806303fd2a45146103bf5780630483f7a0146103e557806306fdde03146103fa575b600080fd5b6103c861dead81565b6040516001600160a01b0390911681526020015b60405180910390f35b6103f86103f3366004612c2c565b6108ea565b005b60408051808201909152600681526544696769747360d01b60208201525b6040516103dc9190612c93565b610438610433366004612cc6565b610979565b60405190151581526020016103dc565b610451600a5481565b6040519081526020016103dc565b6103c87f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b601154610451565b61043861049c366004612cf0565b61098f565b6103c87f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f3881565b600d5461043890640100000000900460ff1681565b604051601281526020016103dc565b6103f86104fa366004612cc6565b610a36565b61045160085481565b610438610516366004612cc6565b610a56565b6103f8610a8d565b600d5461043890610100900460ff1681565b6002546103c8906001600160a01b031681565b600d546104389060ff1681565b6004546103c8906001600160a01b031681565b6103f8610c0a565b61043861057e366004612d2c565b6001600160a01b031660009081526015602052604090205460ff1690565b6103f86105aa366004612d2c565b610cef565b610451600b5481565b61045160055481565b6103f86105cf366004612d47565b610d6f565b6103f86105e2366004612d73565b610e53565b6104386105f5366004612d2c565b6001600160a01b031660009081526017602052604090205460ff1690565b6103f8610621366004612db5565b610ecb565b610438610634366004612d2c565b6001600160a01b031660009081526018602052604090205460ff1690565b600d546104389062010000900460ff1681565b610451610673366004612d2c565b6001600160a01b031660009081526013602052604090205490565b6103f8610f92565b610451600c5481565b6003546103c8906001600160a01b031681565b600d54610438906301000000900460ff1681565b6000546001600160a01b03166103c8565b60408051808201909152600681526544494749545360d01b6020820152610418565b6103f8610707366004612c2c565b610fa6565b6103f861071a366004612db5565b611016565b61043861072d366004612cc6565b61104b565b610451610740366004612d2c565b6110d8565b610438610753366004612cc6565b61116d565b6103f8610766366004612db5565b61117a565b6001546103c8906001600160a01b031681565b6103f861078c366004612d2c565b61123a565b61043861079f366004612d2c565b600e6020526000908152604090205460ff1681565b61045160075481565b6103f86107cb366004612c2c565b6113b7565b6103f86107de366004612dce565b61148d565b6104386107f1366004612d2c565b6114e2565b6103f8611571565b6103f861080c366004612c2c565b611588565b6103f861081f366004612c2c565b6115f4565b610451610832366004612deb565b6001600160a01b03918216600090815260146020908152604080832093909416825291909152205490565b6103f861086b366004612dce565b611658565b61045160095481565b6103f8610887366004612dce565b6116ab565b61045160065481565b6103f86108a3366004612deb565b611702565b6103f86108b6366004612d2c565b6117df565b6103c87f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b6103f8611855565b6108f261199a565b60405162241fbd60e51b81526001600160a01b03838116600483015282151560248301527f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f381690630483f7a0906044015b600060405180830381600087803b15801561095d57600080fd5b505af1158015610971573d6000803e3d6000fd5b505050505050565b60006109863384846119f4565b50600192915050565b600061099c848484611b01565b6001600160a01b038416600090815260146020908152604080832033845290915290205482811015610a155760405162461bcd60e51b815260206004820152601d60248201527f4469676974733a20747820616d6f756e74203e20616c6c6f77616e636500000060448201526064015b60405180910390fd5b610a298533610a248685612e34565b6119f4565b60019150505b9392505050565b610a3e61199a565b610a526001600160a01b03831633836121e9565b5050565b3360008181526014602090815260408083206001600160a01b03871684529091528120549091610986918590610a24908690612e4b565b6002546001600160a01b03163314610ae75760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c792063616c6c61626c65206279204d756c7469526577617264730000006044820152606401610a0c565b6001546001600160a01b03166000908152601360205260408120546001546040516370a0823160e01b81526001600160a01b0391821660048201529192506000917f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f909116906370a0823190602401602060405180830381865afa158015610b73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b979190612e63565b600954600d549192508310159062010000900460ff168015610bb65750805b8015610bc5575060125460ff16155b15610c05576012805460ff19166001179055600d54610100900460ff16610bec5760095492505b610bf6838361223b565b42600a556012805460ff191690555b505050565b60006001600160a01b037f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f381663807ab4f7336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af1158015610c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca69190612e7c565b905080610cec5760405162461bcd60e51b8152602060048201526014602482015273111a59da5d1cce8818db185a5b4819985a5b195960621b6044820152606401610a0c565b50565b610cf761199a565b6001600160a01b038116610d4d5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207365742061646472657373207a65726f0000000000000000006044820152606401610a0c565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b610d7761199a565b6103208311158015610d8b57506103208211155b8015610d9957506103208111155b610de55760405162461bcd60e51b815260206004820152601960248201527f4561636820666565206d7573742062652062656c6f77203825000000000000006044820152606401610a0c565b60058390556006829055600781905580610dff8385612e4b565b610e099190612e4b565b60085560408051848152602081018490529081018290527fe45758128ecb3f05f169ba1786802a05cda7e2f59e3d82ad3b4b0edca93052fb906060015b60405180910390a1505050565b610e5b61199a565b600d8054600984905562ffff0019166201000085151590810261ff001916919091176101008415159081029190911790925560408051918252602082018590528101919091527fab295b2154555078d638d8a755641a34fb91406a5da5d6df445b7d9cb266335190606001610e46565b610ed361199a565b60648110158015610ee657506127108111155b610f325760405162461bcd60e51b815260206004820152601e60248201527f425053206f6e6c79206265747765656e2031303020616e6420313030303000006044820152606401610a0c565b600c81905561271081610f4460115490565b610f4e9190612e99565b610f589190612eb8565b6010556040518181527f316ed3138666535a35a7c9226c9a5e90b681761e8721a2d3d389991bf57b5e58906020015b60405180910390a150565b610f9a61199a565b610fa46000612702565b565b610fae61199a565b6004546001600160a01b038381169116141561100c5760405162461bcd60e51b815260206004820152601d60248201527f4469676974733a204c502063616e206e6f742062652072656d6f7665640000006044820152606401610a0c565b610a528282612752565b61101e61199a565b604051339082156108fc029083906000818181858888f19350505050158015610a52573d6000803e3d6000fd5b3360009081526014602090815260408083206001600160a01b0386168452909152812054828110156110bf5760405162461bcd60e51b815260206004820152601f60248201527f4469676974733a2064656372656173656420616c6c6f77616e6365203c2030006044820152606401610a0c565b6110ce3385610a248685612e34565b5060019392505050565b6040516302a2e74960e61b81526001600160a01b0382811660048301526000917f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f389091169063a8b9d24090602401602060405180830381865afa158015611143573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612e63565b92915050565b6000610986338484611b01565b61118261199a565b6031811015801561119557506127108111155b6111e15760405162461bcd60e51b815260206004820152601d60248201527f425053206f6e6c79206265747765656e20343920616e642031303030300000006044820152606401610a0c565b600b819055612710816111f360115490565b6111fd9190612e99565b6112079190612eb8565b600f556040518181527f64646f2003ab075c131ee5bde4e6dc9f26132c79b2f7924156e1138d8b5f7b7d90602001610f87565b61124261199a565b6001546001600160a01b03161561129b5760405162461bcd60e51b815260206004820181905260248201527f4469676974733a20746f6b656e53746f7261676520616c7265616479207365746044820152606401610a0c565b600180546001600160a01b0319166001600160a01b03838116918217835560405162241fbd60e51b8152600481019290925260248201929092527f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f3890911690630483f7a090604401600060405180830381600087803b15801561131d57600080fd5b505af1158015611331573d6000803e3d6000fd5b50506001805461134c93506001600160a01b031691506113b7565b60018054611365916001600160a01b03909116906115f4565b6001805461137e916001600160a01b0390911690611588565b6040516001600160a01b03821681527f025fd4b5632bc2c19c0ecc34263ec81897a3f85327e09b0344dd2d16b384110890602001610f87565b6113bf61199a565b6001600160a01b03821660009081526015602052604090205460ff161515811515141561142e5760405162461bcd60e51b815260206004820152601860248201527f4469676974733a2073616d652073746174652076616c756500000000000000006044820152606401610a0c565b6001600160a01b038216600081815260156020908152604091829020805460ff191685151590811790915591519182527f9d8f7706ea1113d1a167b526eca956215946dd36cc7df39eb16180222d8b5df7910160405180910390a25050565b61149561199a565b600d805482151563010000000263ff000000199091161790556040517f5bb2376cf656637e70e36c01d3da25685bf3b353f18681b8a5e48c7b2effe13390610f8790831515815260200190565b60405163c705c56960e01b81526001600160a01b0382811660048301526000917f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f389091169063c705c56990602401602060405180830381865afa15801561154d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111679190612e7c565b61157961199a565b600d805460ff19166001179055565b61159061199a565b6001600160a01b038216600081815260186020908152604091829020805460ff19168515159081179091558251938452908301527f4a8452f723db48bf05f301f94d62a2cf7a72976cde77d83e3646584858b8f4b291015b60405180910390a15050565b6115fc61199a565b6001600160a01b038216600081815260176020908152604091829020805460ff19168515159081179091558251938452908301527fc5e00cfc9494c002f5a5ecb735339bf61c88d0e9340bbe76d10bb5f0e48e6f8591016115e8565b61166061199a565b600d8054821515620100000262ff0000199091161790556040517fb9bbb15e341600c8d067a0cadeba219905d5ba6d422b193c9c32265d26fc51c890610f8790831515815260200190565b6116b361199a565b600d80548215156401000000000264ff00000000199091161790556040517f341322866a3a2c26c27efa4c270c5ba86f6963257118897dd8196f224c002d4390610f8790831515815260200190565b61170a61199a565b6001600160a01b0382166117505760405162461bcd60e51b815260206004820152600d60248201526c4469676974733a207a65726f2160981b6044820152606401610a0c565b6001600160a01b0381166117965760405162461bcd60e51b815260206004820152600d60248201526c4469676974733a207a65726f2160981b6044820152606401610a0c565b600380546001600160a01b0319166001600160a01b0384811691909117909155600154604051630a5bc28360e21b8152838316600482015291169063296f0a0c90602401610943565b6117e761199a565b6001600160a01b03811661184c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a0c565b610cec81612702565b600d54640100000000900460ff166118af5760405162461bcd60e51b815260206004820152601f60248201527f4469676974733a20636f6d706f756e64696e67206e6f7420656e61626c6564006044820152606401610a0c565b60006001600160a01b037f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f3816636de1a5a9336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af1158015611927573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061194b9190612e7c565b905080610cec5760405162461bcd60e51b815260206004820152601a60248201527f4469676974733a20636f6d706f756e64696e67206661696c65640000000000006044820152606401610a0c565b6000546001600160a01b03163314610fa45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a0c565b6001600160a01b038316611a4a5760405162461bcd60e51b815260206004820152601e60248201527f4469676974733a20617070726f76652066726f6d2030206164647265737300006044820152606401610a0c565b6001600160a01b038216611aa05760405162461bcd60e51b815260206004820152601c60248201527f4469676974733a20617070726f766520746f20302061646472657373000000006044820152606401610a0c565b6001600160a01b0383811660008181526014602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600d5460ff1680611b1f57506000546001600160a01b038481169116145b80611b3757506000546001600160a01b038381169116145b80611b5a57506001600160a01b03831660009081526016602052604090205460ff165b80611b7d57506001600160a01b03821660009081526016602052604090205460ff165b611bb45760405162461bcd60e51b81526020600482015260086024820152672737ba1027b832b760c11b6044820152606401610a0c565b6001600160a01b038316611c0a5760405162461bcd60e51b815260206004820152601f60248201527f4469676974733a207472616e736665722066726f6d20302061646472657373006044820152606401610a0c565b6001600160a01b038216611c605760405162461bcd60e51b815260206004820152601d60248201527f4469676974733a207472616e7366657220746f203020616464726573730000006044820152606401610a0c565b600f5481111580611c8957506001600160a01b03831660009081526017602052604090205460ff165b611cc95760405162461bcd60e51b8152602060048201526011602482015270151608131a5b5a5d08115e18d959591959607a1b6044820152606401610a0c565b6000546001600160a01b03848116911614801590611cf057506001600160a01b0382163014155b8015611d0757506001600160a01b03821661dead14155b8015611d2157506004546001600160a01b03838116911614155b15611d6f576001600160a01b03821660009081526013602090815260408083205460189092529091205460ff1680611d645750601054611d618383612e4b565b11155b611d6d57600080fd5b505b6001600160a01b03831660009081526013602052604090205481811015611dd85760405162461bcd60e51b815260206004820181905260248201527f4469676974733a207472616e7366657220657863656564732062616c616e63656044820152606401610a0c565b6001546001600160a01b03166000908152601360205260408120546001546040516370a0823160e01b81526001600160a01b0391821660048201529192506000917f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f909116906370a0823190602401602060405180830381865afa158015611e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e889190612e63565b600954600d549192508310159062010000900460ff168015611ea75750805b8015611eb6575060125460ff16155b8015611edb57506001600160a01b0387166000908152600e602052604090205460ff16155b8015611f1957507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316876001600160a01b031614155b8015611f3357506000546001600160a01b03888116911614155b8015611f4d57506000546001600160a01b03878116911614155b15611f8d576012805460ff19166001179055600d54610100900460ff16611f745760095492505b611f7e838361223b565b42600a556012805460ff191690555b6004546000906001600160a01b0389811691161480611fb957506004546001600160a01b038881169116145b15611fc2575060015b6001600160a01b03881660009081526015602052604090205460ff168061200157506001600160a01b03871660009081526015602052604090205460ff165b1561200a575060005b60125460ff16806120255750600d546301000000900460ff16155b1561202e575060005b801561207a576000612710600854886120479190612e99565b6120519190612eb8565b905061205d8188612e34565b600154909750612078908a906001600160a01b0316836128ac565b505b6120858888886128ac565b7f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f386001600160a01b031663e30443bc896120d48b6001600160a01b031660009081526013602052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561211a57600080fd5b505af115801561212e573d6000803e3d6000fd5b505050507f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f386001600160a01b031663e30443bc886121818a6001600160a01b031660009081526013602052604090205490565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b1580156121c757600080fd5b505af11580156121db573d6000803e3d6000fd5b505050505050505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c059084906129af565b81612244575050565b6003546000906001600160a01b03161580159061226357506000600854115b15612285576008546005546122789085612e99565b6122829190612eb8565b90505b6000807f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f386001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156122e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061230a9190612e63565b11801561231957506000600854115b1561233b5760085460075461232e9086612e99565b6123389190612eb8565b90505b6000816123488487612e34565b6123529190612e34565b90506000612361600283612eb8565b9050600061236f8284612e34565b905060008261237e8688612e4b565b6123889190612e4b565b6001546040516370a0823160e01b81526001600160a01b0391821660048201529192506000917f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f909116906370a0823190602401602060405180830381865afa1580156123f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061241d9190612e63565b60015460405163294a237b60e21b8152600481018590529192506001600160a01b03169063a5288dec90602401600060405180830381600087803b15801561246457600080fd5b505af1158015612478573d6000803e3d6000fd5b50506001546040516370a0823160e01b81526001600160a01b039182166004820152600093508b925084917f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16906370a0823190602401602060405180830381865afa1580156124ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125109190612e63565b61251a9190612e34565b6125249190612e4b565b90506000836125338a84612e99565b61253d9190612eb8565b905060008461254c8a85612e99565b6125569190612eb8565b90506000816125658486612e34565b61256f9190612e34565b905082156125e05760015460035460405163f48b39dd60e01b81526001600160a01b0391821660048201526024810186905291169063f48b39dd90604401600060405180830381600087803b1580156125c757600080fd5b505af11580156125db573d6000803e3d6000fd5b505050505b600154604051634e6a20ed60e11b815260048101899052602481018390526001600160a01b0390911690639cd441da90604401600060405180830381600087803b15801561262d57600080fd5b505af1158015612641573d6000803e3d6000fd5b5050604080518b8152602081018590529081018a90527fb63dc6f50047533abe2d6adf180d38d524c8d98e55ad199aac8d6b9801bbe24a9250606001905060405180910390a181156126f35760015460405163757e4b5b60e01b8152600481018c9052602481018490526001600160a01b039091169063757e4b5b90604401600060405180830381600087803b1580156126da57600080fd5b505af11580156126ee573d6000803e3d6000fd5b505050505b50505050505050505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0382166000908152600e602052604090205460ff16151581151514156127c15760405162461bcd60e51b815260206004820152601e60248201527f4469676974733a20414d4d20706169722069732073616d652076616c756500006044820152606401610a0c565b6001600160a01b0382166000908152600e60205260409020805460ff191682158015919091179091556128705760405162241fbd60e51b81526001600160a01b038381166004830152600160248301527f000000000000000000000000ad1b1e9db5a55f0608ad6934bfda871645090f381690630483f7a090604401600060405180830381600087803b15801561285757600080fd5b505af115801561286b573d6000803e3d6000fd5b505050505b604051811515906001600160a01b038416907fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab90600090a35050565b6001600160a01b038316600090815260136020526040902054818110156129155760405162461bcd60e51b815260206004820152601b60248201527f4469676974733a20747820616d6f756e74203e2062616c616e636500000000006044820152606401610a0c565b61291f8282612e34565b6001600160a01b038086166000908152601360205260408082209390935590851681529081208054849290612955908490612e4b565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516129a191815260200190565b60405180910390a350505050565b6000612a04826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612a819092919063ffffffff16565b805190915015610c055780806020019051810190612a229190612e7c565b610c055760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a0c565b6060612a908484600085612a98565b949350505050565b606082471015612af95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a0c565b6001600160a01b0385163b612b505760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a0c565b600080866001600160a01b03168587604051612b6c9190612eda565b60006040518083038185875af1925050503d8060008114612ba9576040519150601f19603f3d011682016040523d82523d6000602084013e612bae565b606091505b5091509150612bbe828286612bc9565b979650505050505050565b60608315612bd8575081610a2f565b825115612be85782518084602001fd5b8160405162461bcd60e51b8152600401610a0c9190612c93565b80356001600160a01b0381168114612c1957600080fd5b919050565b8015158114610cec57600080fd5b60008060408385031215612c3f57600080fd5b612c4883612c02565b91506020830135612c5881612c1e565b809150509250929050565b60005b83811015612c7e578181015183820152602001612c66565b83811115612c8d576000848401525b50505050565b6020815260008251806020840152612cb2816040850160208701612c63565b601f01601f19169190910160400192915050565b60008060408385031215612cd957600080fd5b612ce283612c02565b946020939093013593505050565b600080600060608486031215612d0557600080fd5b612d0e84612c02565b9250612d1c60208501612c02565b9150604084013590509250925092565b600060208284031215612d3e57600080fd5b610a2f82612c02565b600080600060608486031215612d5c57600080fd5b505081359360208301359350604090920135919050565b600080600060608486031215612d8857600080fd5b8335612d9381612c1e565b9250602084013591506040840135612daa81612c1e565b809150509250925092565b600060208284031215612dc757600080fd5b5035919050565b600060208284031215612de057600080fd5b8135610a2f81612c1e565b60008060408385031215612dfe57600080fd5b612e0783612c02565b9150612e1560208401612c02565b90509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015612e4657612e46612e1e565b500390565b60008219821115612e5e57612e5e612e1e565b500190565b600060208284031215612e7557600080fd5b5051919050565b600060208284031215612e8e57600080fd5b8151610a2f81612c1e565b6000816000190483118215151615612eb357612eb3612e1e565b500290565b600082612ed557634e487b7160e01b600052601260045260246000fd5b500490565b60008251612eec818460208701612c63565b919091019291505056fea2646970667358221220174991cdf6cd29124380b3dcc35d21bb5b091e0d29e637aad70a1c790958d47264736f6c634300080a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d0000000000000000000000000c1a3e4e1c3da4c89582dfa1afa87a1853d7f78f000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000030000000000000000000000006fd99eb139e942d5b6aa3827d9725e3413e76ea3000000000000000000000000d152f549545093347a162dce210e7293f14521500000000000000000000000000c1a3e4e1c3da4c89582dfa1afa87a1853d7f78f

-----Decoded View---------------
Arg [0] : _dai (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F
Arg [1] : _uniswapRouter (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [2] : _marketingWallet (address): 0x0c1a3E4E1C3DA4c89582dfA1AFA87A1853D7f78f
Arg [3] : whitelistAddress (address[]): 0x6fd99EB139E942d5b6aA3827d9725E3413E76eA3,0xD152f549545093347A162Dce210e7293f1452150,0x0c1a3E4E1C3DA4c89582dfA1AFA87A1853D7f78f

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [2] : 0000000000000000000000000c1a3e4e1c3da4c89582dfa1afa87a1853d7f78f
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [5] : 0000000000000000000000006fd99eb139e942d5b6aa3827d9725e3413e76ea3
Arg [6] : 000000000000000000000000d152f549545093347a162dce210e7293f1452150
Arg [7] : 0000000000000000000000000c1a3e4e1c3da4c89582dfa1afa87a1853d7f78f


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.