false
true
0

Contract Address Details

0x43987cBEAc65C0C3fDFFf6fed955165A6d769221

Contract Name
DividendDistributor
Creator
0x616cb6–71845d at 0xa1212f–9a9bc6
Balance
0 PLS ( )
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
93,184 Transfers
Gas Used
Fetching gas used...
Last Balance Update
25902976
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
DividendDistributor




Optimization enabled
true
Compiler version
v0.8.20+commit.a1b79de6




Optimization runs
200
EVM Version
paris




Verified at
2025-01-25T04:30:55.615683Z

Constructor Arguments

0x00000000000000000000000098bf93ebf5c380c0e6ae8e192a7e2ae08edacc02000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9000000000000000000000000eb45a3c4aedd0f47f345fb4c8a1802bb5740d725

Arg [0] (address) : 0x98bf93ebf5c380c0e6ae8e192a7e2ae08edacc02
Arg [1] (address) : 0x165c3410fc91ef562c50559f7d2289febed552d9
Arg [2] (address) : 0xeb45a3c4aedd0f47f345fb4c8a1802bb5740d725

              

Contract source code

//SPDX-License-Identifier: MIT
// File: @openzeppelin/contracts/utils/ReentrancyGuard.sol


// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

// File: @openzeppelin/contracts/utils/Context.sol


// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol


// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;


/**
 * @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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @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 {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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: contracts/Gelato.sol

pragma solidity 0.8.20;



/**
 * Standard SafeMath, stripped down to just add/sub/mul/div
 */
library SafeMath {
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }
}

/**
 * ERC20 standard interface.
 */
interface IERC20 {
    function totalSupply() external view returns (uint256);

    function decimals() external view returns (uint8);

    function symbol() external view returns (string memory);

    function name() external view returns (string memory);

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

    function transfer(
        address recipient,
        uint256 amount
    ) external returns (bool);

    function allowance(
        address _owner,
        address spender
    ) external view returns (uint256);

    function approve(address spender, uint256 amount) external returns (bool);

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );
}

interface ISOLIDX {
    function burn(uint256 amount) external;
}

interface ISTACKED {
    function burn(uint256 amount) external;
}

interface IDEXFactory {
    function createPair(
        address tokenA,
        address tokenB
    ) external returns (address pair);
}

interface IDEXRouter {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);

    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    )
        external
        payable
        returns (uint amountToken, uint amountETH, uint liquidity);

    function 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 swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function swapExactETHForTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
}

interface IDividendDistributor {
    function setDistributionCriteria(
        uint256 _minSolidXPeriod,
        uint256 _minSolidXDistribution,
        uint256 _minHexPeriod,
        uint256 _minHexDistribution
    ) external;

    function setShare(address shareholder, uint256 amount) external;

    function depositForSolidXBurn() external payable;

    function depositForStackedBurn() external payable;

    function depositForSolidXReflection() external payable;

    function depositForHexReflection() external payable;

    function processSolidX(uint256 gas) external;

    function processHex(uint256 gas) external;

    function claimDividend() external;
}

contract DividendDistributor is IDividendDistributor {
    using SafeMath for uint256;

    address _token;

    struct Share {
        uint256 amount;
        uint256 solidXTotalExcluded;
        uint256 solidXTotalRealised;
        uint256 hexTotalExcluded;
        uint256 hexTotalRealised;
    }

    IERC20 SOLIDX = IERC20(0x8Da17Db850315A34532108f0f5458fc0401525f6);
    IERC20 HEX = IERC20(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39);
    IERC20 STACKED = IERC20(0x67d8954C2B7386c8Dbf6936Cc2355bA2227F0a8f);
    IERC20 WPLS = IERC20(0xA1077a294dDE1B09bB078844df40758a5D0f9a27);
    address ZERO = 0x0000000000000000000000000000000000000000;
    IDEXRouter public pulseRouterV1;
    IDEXRouter public pulseRouterV2;
    IDEXRouter public nineinchRouter;

    address[] shareholders;
    mapping(address => uint256) shareholderSolidXIndexes;
    mapping(address => uint256) shareholderSolidXClaims;
    mapping(address => uint256) shareholderHexIndexes;
    mapping(address => uint256) shareholderHexClaims;

    mapping(address => Share) public shares;
    uint256 public totalShares;

    // SolidX Trackers
    uint256 currentSolidXIndex;
    uint256 public totalSolidXDividends;
    uint256 public totalSolidXDistributed;
    uint256 public solidXDividendsPerShare;
    uint256 public solidXDividendsPerShareAccuracyFactor = 10 ** 36;
    uint256 public minSolidXPeriod = 1 hours; // min 1 hour delay
    uint256 public minSolidXDistribution = (1 * (10 ** 18)) / 10; // 0.1 SOLIDX minimum auto send
    uint256 public totalSolidXBurned;

    // HEX Dividend Trackers
    uint256 currentHexIndex;
    uint256 public totalHexDividends;
    uint256 public totalHexDistributed;
    uint256 public hexDividendsPerShare;
    uint256 public hexDividendsPerShareAccuracyFactor = 10 ** 36;
    uint256 public minHexPeriod = 1 hours; // min 1 hour delay
    uint256 public minHexDistribution = 100 * (10 ** 8); // 100 HEX minimum auto send

    // Stacked Italian Trackers
    uint256 public totalStackedBurned;

    bool initialized;

    modifier initialization() {
        require(!initialized);
        _;
        initialized = true;
    }

    modifier onlyToken() {
        require(msg.sender == _token);
        _;
    }

    constructor(address _pulseRouterV1, address _pulseRouterV2, address _nineinchRouter) {
        pulseRouterV1 = _pulseRouterV1 != address(0)
            ? IDEXRouter(_pulseRouterV1)
            : IDEXRouter(0x98bf93ebf5c380C0e6Ae8e192A7e2AE08edAcc02);
        pulseRouterV2 = _pulseRouterV2 != address(0)
            ? IDEXRouter(_pulseRouterV2)
            : IDEXRouter(0x165C3410fC91EF562C50559f7d2289fEbed552d9);
        nineinchRouter = _nineinchRouter != address(0)
            ? IDEXRouter(_nineinchRouter)
            : IDEXRouter(0xeB45a3c4aedd0F47F345fB4c8A1802BB5740d725);
        _token = msg.sender;

        STACKED.approve(address(STACKED), type(uint256).max);
    }

    function setDistributionCriteria(
        uint256 _minSolidXPeriod,
        uint256 _minSolidXDistribution,
        uint256 _minHexPeriod,
        uint256 _minHexDistribution
    ) external override onlyToken {
        minSolidXPeriod = _minSolidXPeriod;
        minSolidXDistribution = _minSolidXDistribution;
        minHexPeriod = _minHexPeriod;
        minHexDistribution = _minHexDistribution;
    }

    function setShare(
        address shareholder,
        uint256 amount
    ) external override onlyToken {
        if (shares[shareholder].amount > 0) {
            distributeSolidXDividend(shareholder);
            distributeHexDividend(shareholder);
        }

        if (amount > 0 && shares[shareholder].amount == 0) {
            addShareholder(shareholder);
        } else if (amount == 0 && shares[shareholder].amount > 0) {
            removeShareholder(shareholder);
        }

        totalShares = totalShares.sub(shares[shareholder].amount).add(amount);
        shares[shareholder].amount = amount;

        shares[shareholder].solidXTotalExcluded = getCumulativeSolidXDividends(
            shares[shareholder].amount
        );

        shares[shareholder].hexTotalExcluded = getCumulativeHexDividends(
            shares[shareholder].amount
        );
    }

    function depositForSolidXBurn() external payable override onlyToken {
        uint256 solidXBefore = SOLIDX.balanceOf(address(this));

        address[] memory path = new address[](2);
        path[0] = address(WPLS);
        path[1] = address(SOLIDX);

        nineinchRouter.swapExactETHForTokens{value: msg.value}(
            0,
            path,
            address(this),
            block.timestamp
        );

        uint256 solidXGained = SOLIDX.balanceOf(address(this)).sub(
            solidXBefore
        );

        ISOLIDX(address(SOLIDX)).burn(solidXGained);
        totalSolidXBurned = totalSolidXBurned.add(solidXGained);
    }

    function depositForStackedBurn() external payable override onlyToken {
        uint256 stackedBalanceBefore = STACKED.balanceOf(address(this));

        address[] memory path = new address[](2);
        path[0] = address(WPLS);
        path[1] = address(STACKED);

        nineinchRouter.swapExactETHForTokens{value: msg.value}(
            0,
            path,
            address(this),
            block.timestamp
        );

        uint256 stackedGained = STACKED.balanceOf(address(this)).sub(
            stackedBalanceBefore
        );

        ISTACKED(address(STACKED)).burn(stackedGained);
        totalStackedBurned = totalStackedBurned.add(stackedGained);
    }

    function depositForSolidXReflection() external payable override onlyToken {
        uint256 solidXBalanceBefore = SOLIDX.balanceOf(address(this));

        address[] memory path = new address[](2);
        path[0] = address(WPLS);
        path[1] = address(SOLIDX);

        nineinchRouter.swapExactETHForTokens{value: msg.value}(
            0,
            path,
            address(this),
            block.timestamp
        );

        uint256 solidXGained = SOLIDX.balanceOf(address(this)).sub(
            solidXBalanceBefore
        );

        totalSolidXDividends = totalSolidXDividends.add(solidXGained);
        solidXDividendsPerShare = solidXDividendsPerShare.add(
            solidXDividendsPerShareAccuracyFactor.mul(solidXGained).div(
                totalShares
            )
        );
    }

    function depositForHexReflection() external payable override onlyToken {
        uint256 hexBalanceBefore = HEX.balanceOf(address(this));

        address[] memory path = new address[](2);
        path[0] = address(WPLS);
        path[1] = address(HEX);

        pulseRouterV1.swapExactETHForTokens{value: msg.value}(
            0,
            path,
            address(this),
            block.timestamp
        );

        uint256 hexGained = HEX.balanceOf(address(this)).sub(hexBalanceBefore);

        totalHexDividends = totalHexDividends.add(hexGained);
        hexDividendsPerShare = hexDividendsPerShare.add(
            hexDividendsPerShareAccuracyFactor.mul(hexGained).div(totalShares)
        );
    }

    function distributeSolidXDividend(address shareholder) internal {
        if (shares[shareholder].amount == 0) {
            return;
        }

        uint256 amount = getUnpaidSolidXEarnings(shareholder);
        if (amount > 0) {
            totalSolidXDistributed = totalSolidXDistributed.add(amount);
            SOLIDX.transfer(shareholder, amount);
            shareholderSolidXClaims[shareholder] = block.timestamp;
            shares[shareholder].solidXTotalRealised = shares[shareholder]
                .solidXTotalRealised
                .add(amount);
            shares[shareholder]
                .solidXTotalExcluded = getCumulativeSolidXDividends(
                shares[shareholder].amount
            );
        }
    }

    function distributeHexDividend(address shareholder) internal {
        if (shares[shareholder].amount == 0) {
            return;
        }

        uint256 amount = getUnpaidHexEarnings(shareholder);
        if (amount > 0) {
            totalHexDistributed = totalHexDistributed.add(amount);
            HEX.transfer(shareholder, amount);
            shareholderHexClaims[shareholder] = block.timestamp;
            shares[shareholder].hexTotalRealised = shares[shareholder]
                .hexTotalRealised
                .add(amount);
            shares[shareholder].hexTotalExcluded = getCumulativeHexDividends(
                shares[shareholder].amount
            );
        }
    }

    function processSolidX(uint256 gas) external override onlyToken {
        uint256 shareholderCount = shareholders.length;

        if (shareholderCount == 0) {
            return;
        }

        uint256 gasUsed = 0;
        uint256 gasLeft = gasleft();

        uint256 iterations = 0;

        while (gasUsed < gas && iterations < shareholderCount) {
            if (currentSolidXIndex >= shareholderCount) {
                currentSolidXIndex = 0;
            }

            if (shouldSolidXDistribute(shareholders[currentSolidXIndex])) {
                distributeSolidXDividend(shareholders[currentSolidXIndex]);
            }

            gasUsed = gasUsed.add(gasLeft.sub(gasleft()));
            gasLeft = gasleft();
            currentSolidXIndex++;
            iterations++;
        }
    }

    function processHex(uint256 gas) external override onlyToken {
        uint256 shareholderCount = shareholders.length;

        if (shareholderCount == 0) {
            return;
        }

        uint256 gasUsed = 0;
        uint256 gasLeft = gasleft();

        uint256 iterations = 0;

        while (gasUsed < gas && iterations < shareholderCount) {
            if (currentHexIndex >= shareholderCount) {
                currentHexIndex = 0;
            }

            if (shouldHexDistribute(shareholders[currentHexIndex])) {
                distributeHexDividend(shareholders[currentHexIndex]);
            }

            gasUsed = gasUsed.add(gasLeft.sub(gasleft()));
            gasLeft = gasleft();
            currentHexIndex++;
            iterations++;
        }
    }

    function shouldSolidXDistribute(
        address shareholder
    ) internal view returns (bool) {
        return
            shareholderSolidXClaims[shareholder] + minSolidXPeriod <
            block.timestamp &&
            getUnpaidSolidXEarnings(shareholder) > minSolidXDistribution;
    }

    function shouldHexDistribute(
        address shareholder
    ) internal view returns (bool) {
        return
            shareholderHexClaims[shareholder] + minHexPeriod <
            block.timestamp &&
            getUnpaidHexEarnings(shareholder) > minHexDistribution;
    }

    function claimDividend() external override {
        distributeSolidXDividend(msg.sender);
        distributeHexDividend(msg.sender);
    }

    function getUnpaidSolidXEarnings(
        address shareholder
    ) public view returns (uint256) {
        if (shares[shareholder].amount == 0) {
            return 0;
        }

        uint256 shareholderTotalDividends = getCumulativeSolidXDividends(
            shares[shareholder].amount
        );
        uint256 shareholderTotalExcluded = shares[shareholder]
            .solidXTotalExcluded;

        if (shareholderTotalDividends <= shareholderTotalExcluded) {
            return 0;
        }

        return shareholderTotalDividends.sub(shareholderTotalExcluded);
    }

    function getUnpaidHexEarnings(
        address shareholder
    ) public view returns (uint256) {
        if (shares[shareholder].amount == 0) {
            return 0;
        }

        uint256 shareholderTotalDividends = getCumulativeHexDividends(
            shares[shareholder].amount
        );
        uint256 shareholderTotalExcluded = shares[shareholder].hexTotalExcluded;

        if (shareholderTotalDividends <= shareholderTotalExcluded) {
            return 0;
        }

        return shareholderTotalDividends.sub(shareholderTotalExcluded);
    }

    function getCumulativeSolidXDividends(
        uint256 share
    ) internal view returns (uint256) {
        return
            share.mul(solidXDividendsPerShare).div(
                solidXDividendsPerShareAccuracyFactor
            );
    }

    function getCumulativeHexDividends(
        uint256 share
    ) internal view returns (uint256) {
        return
            share.mul(hexDividendsPerShare).div(
                hexDividendsPerShareAccuracyFactor
            );
    }

    function addShareholder(address shareholder) internal {
        shareholderSolidXIndexes[shareholder] = shareholders.length;
        shareholderHexIndexes[shareholder] = shareholders.length;

        shareholders.push(shareholder);
    }

    function removeShareholder(address shareholder) internal {
        shareholders[shareholderSolidXIndexes[shareholder]] = shareholders[
            shareholders.length - 1
        ];
        shareholderSolidXIndexes[
            shareholders[shareholders.length - 1]
        ] = shareholderSolidXIndexes[shareholder];

        shareholders[shareholderHexIndexes[shareholder]] = shareholders[
            shareholders.length - 1
        ];
        shareholderHexIndexes[
            shareholders[shareholders.length - 1]
        ] = shareholderHexIndexes[shareholder];

        shareholders.pop();
    }

    receive() external payable {}
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_pulseRouterV1","internalType":"address"},{"type":"address","name":"_pulseRouterV2","internalType":"address"},{"type":"address","name":"_nineinchRouter","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimDividend","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"depositForHexReflection","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"depositForSolidXBurn","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"depositForSolidXReflection","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"depositForStackedBurn","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUnpaidHexEarnings","inputs":[{"type":"address","name":"shareholder","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getUnpaidSolidXEarnings","inputs":[{"type":"address","name":"shareholder","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"hexDividendsPerShare","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"hexDividendsPerShareAccuracyFactor","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minHexDistribution","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minHexPeriod","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minSolidXDistribution","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minSolidXPeriod","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDEXRouter"}],"name":"nineinchRouter","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"processHex","inputs":[{"type":"uint256","name":"gas","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"processSolidX","inputs":[{"type":"uint256","name":"gas","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDEXRouter"}],"name":"pulseRouterV1","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IDEXRouter"}],"name":"pulseRouterV2","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDistributionCriteria","inputs":[{"type":"uint256","name":"_minSolidXPeriod","internalType":"uint256"},{"type":"uint256","name":"_minSolidXDistribution","internalType":"uint256"},{"type":"uint256","name":"_minHexPeriod","internalType":"uint256"},{"type":"uint256","name":"_minHexDistribution","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setShare","inputs":[{"type":"address","name":"shareholder","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"solidXTotalExcluded","internalType":"uint256"},{"type":"uint256","name":"solidXTotalRealised","internalType":"uint256"},{"type":"uint256","name":"hexTotalExcluded","internalType":"uint256"},{"type":"uint256","name":"hexTotalRealised","internalType":"uint256"}],"name":"shares","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"solidXDividendsPerShare","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"solidXDividendsPerShareAccuracyFactor","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalHexDistributed","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalHexDividends","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalShares","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSolidXBurned","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSolidXDistributed","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSolidXDividends","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalStackedBurned","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x6080604052600180546001600160a01b0319908116738da17db850315a34532108f0f5458fc0401525f617909155600280548216732b591e99afe9f32eaa6214f7b7629768c40eeb391790556003805482167367d8954c2b7386c8dbf6936cc2355ba2227f0a8f17905560048054821673a1077a294dde1b09bb078844df40758a5d0f9a271790556005805490911690556ec097ce7bc90715b34b9f10000000006014819055610e10601581905567016345785d8a0000601655601c91909155601d556402540be400601e55348015620000d857600080fd5b5060405162001ec738038062001ec7833981016040819052620000fb9162000269565b6001600160a01b03831662000125577398bf93ebf5c380c0e6ae8e192a7e2ae08edacc0262000127565b825b600680546001600160a01b0319166001600160a01b039283161790558216620001655773165c3410fc91ef562c50559f7d2289febed552d962000167565b815b600780546001600160a01b0319166001600160a01b039283161790558116620001a55773eb45a3c4aedd0f47f345fb4c8a1802bb5740d725620001a7565b805b600880546001600160a01b039283166001600160a01b031991821617909155600080549091163317905560035460405163095ea7b360e01b815291166004820181905260001960248301529063095ea7b3906044016020604051808303816000875af11580156200021c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002429190620002b3565b50505050620002de565b80516001600160a01b03811681146200026457600080fd5b919050565b6000806000606084860312156200027f57600080fd5b6200028a846200024c565b92506200029a602085016200024c565b9150620002aa604085016200024c565b90509250925092565b600060208284031215620002c657600080fd5b81518015158114620002d757600080fd5b9392505050565b611bd980620002ee6000396000f3fe6080604052600436106101d15760003560e01c806389ed7965116100f7578063ce7c2ac211610095578063df137cf611610064578063df137cf6146104c8578063e0bf82ec146104de578063ef7c3a39146104fe578063f0fc6bca1461050657600080fd5b8063ce7c2ac214610414578063d56916b014610486578063d9cb19df1461049c578063dd728075146104b257600080fd5b80639946b1d7116100d15780639946b1d7146103b2578063b1ae2ada146103d2578063c56b7fc1146103e8578063c702ee3f146103fe57600080fd5b806389ed79651461037457806389fa276d1461037c5780638d5396e91461039257600080fd5b80634bdeabe81161016f5780636bdb4f711161013e5780636bdb4f71146103085780636d2b49401461031e5780637a9a97d71461033e57806383b922181461035e57600080fd5b80634bdeabe8146102845780634f15999a146102a45780635cbe2777146102dc57806364ec8299146102f257600080fd5b80632b46c77a116101ab5780632b46c77a1461020f5780632d98b6d7146102385780633a98ef391461025857806342dc72a11461026e57600080fd5b806314b6ca96146101dd57806317515488146101ff5780631adb88b31461020757600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b506101fd6101f8366004611966565b61051b565b005b6101fd6106d3565b6101fd610903565b34801561021b57600080fd5b5061022560135481565b6040519081526020015b60405180910390f35b34801561024457600080fd5b50610225610253366004611990565b610aeb565b34801561026457600080fd5b50610225600f5481565b34801561027a57600080fd5b50610225601c5481565b34801561029057600080fd5b506101fd61029f3660046119ab565b610b76565b3480156102b057600080fd5b506007546102c4906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b3480156102e857600080fd5b5061022560125481565b3480156102fe57600080fd5b5061022560155481565b34801561031457600080fd5b5061022560115481565b34801561032a57600080fd5b506008546102c4906001600160a01b031681565b34801561034a57600080fd5b50610225610359366004611990565b610c7a565b34801561036a57600080fd5b50610225601f5481565b6101fd610cf3565b34801561038857600080fd5b50610225601d5481565b34801561039e57600080fd5b506006546102c4906001600160a01b031681565b3480156103be57600080fd5b506101fd6103cd3660046119ab565b610f14565b3480156103de57600080fd5b5061022560175481565b3480156103f457600080fd5b50610225601b5481565b34801561040a57600080fd5b5061022560195481565b34801561042057600080fd5b5061045e61042f366004611990565b600e60205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a00161022f565b34801561049257600080fd5b5061022560165481565b3480156104a857600080fd5b50610225601e5481565b3480156104be57600080fd5b5061022560145481565b3480156104d457600080fd5b50610225601a5481565b3480156104ea57600080fd5b506101fd6104f93660046119c4565b61100a565b6101fd611035565b34801561051257600080fd5b506101fd611255565b6000546001600160a01b0316331461053257600080fd5b6001600160a01b0382166000908152600e6020526040902054156105625761055982611269565b610562826113a4565b60008111801561058857506001600160a01b0382166000908152600e6020526040902054155b156105fb57600980546001600160a01b0384166000818152600a60209081526040808320859055600c9091528120839055600183018455929092527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b031916909117905561062e565b8015801561062057506001600160a01b0382166000908152600e602052604090205415155b1561062e5761062e826114be565b6001600160a01b0382166000908152600e6020526040902054600f5461065f918391610659916116b2565b906116fd565b600f556001600160a01b0382166000908152600e6020526040902081905561068681611761565b6001600160a01b0383166000908152600e602052604090206001810191909155546106b09061177e565b6001600160a01b039092166000908152600e602052604090206003019190915550565b6000546001600160a01b031633146106ea57600080fd5b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075791906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b03169183915060009061079d5761079d611a0f565b6001600160a01b03928316602091820292909201015260018054835192169183919081106107cd576107cd611a0f565b6001600160a01b039283166020918202929092010152600854604051637ff36ab560e01b8152911690637ff36ab590349061081390600090869030904290600401611a25565b6000604051808303818588803b15801561082c57600080fd5b505af1158015610840573d6000803e3d6000fd5b50506001546040516370a0823160e01b8152306004820152600094506108c193508692506001600160a01b03909116906370a08231906024015b602060405180830381865afa158015610897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bb91906119f6565b906116b2565b6011549091506108d190826116fd565b601155600f546014546108fb916108f2916108ec908561179b565b9061181d565b601354906116fd565b601355505050565b6000546001600160a01b0316331461091a57600080fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610963573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098791906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b0316918391506000906109cd576109cd611a0f565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106109fe576109fe611a0f565b6001600160a01b039283166020918202929092010152600654604051637ff36ab560e01b8152911690637ff36ab5903490610a4490600090869030904290600401611a25565b6000604051808303818588803b158015610a5d57600080fd5b505af1158015610a71573d6000803e3d6000fd5b50506002546040516370a0823160e01b815230600482015260009450610aaf93508692506001600160a01b03909116906370a082319060240161087a565b601954909150610abf90826116fd565b601955600f54601c54610ae391610ada916108ec908561179b565b601b54906116fd565b601b55505050565b6001600160a01b0381166000908152600e60205260408120548103610b1257506000919050565b6001600160a01b0382166000908152600e6020526040812054610b3490611761565b6001600160a01b0384166000908152600e6020526040902060010154909150808211610b64575060009392505050565b610b6e82826116b2565b949350505050565b6000546001600160a01b03163314610b8d57600080fd5b6009546000819003610b9d575050565b6000805a905060005b8483108015610bb457508381105b15610c73578360185410610bc85760006018555b610bfa600960185481548110610be057610be0611a0f565b6000918252602090912001546001600160a01b031661185f565b15610c3157610c31600960185481548110610c1757610c17611a0f565b6000918252602090912001546001600160a01b03166113a4565b610c46610c3f5a84906116b2565b84906116fd565b92505a601880549193506000610c5b83611aa5565b91905055508080610c6b90611aa5565b915050610ba6565b5050505050565b6001600160a01b0381166000908152600e60205260408120548103610ca157506000919050565b6001600160a01b0382166000908152600e6020526040812054610cc39061177e565b6001600160a01b0384166000908152600e6020526040902060030154909150808211610b64575060009392505050565b6000546001600160a01b03163314610d0a57600080fd5b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7791906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b031691839150600090610dbd57610dbd611a0f565b6001600160a01b039283166020918202929092010152600354825191169082906001908110610dee57610dee611a0f565b6001600160a01b039283166020918202929092010152600854604051637ff36ab560e01b8152911690637ff36ab5903490610e3490600090869030904290600401611a25565b6000604051808303818588803b158015610e4d57600080fd5b505af1158015610e61573d6000803e3d6000fd5b50506003546040516370a0823160e01b815230600482015260009450610e9f93508692506001600160a01b03909116906370a082319060240161087a565b600354604051630852cd8d60e31b8152600481018390529192506001600160a01b0316906342966c6890602401600060405180830381600087803b158015610ee657600080fd5b505af1158015610efa573d6000803e3d6000fd5b5050601f54610f0c92509050826116fd565b601f55505050565b6000546001600160a01b03163314610f2b57600080fd5b6009546000819003610f3b575050565b6000805a905060005b8483108015610f5257508381105b15610c73578360105410610f665760006010555b610f98600960105481548110610f7e57610f7e611a0f565b6000918252602090912001546001600160a01b03166118a4565b15610fcf57610fcf600960105481548110610fb557610fb5611a0f565b6000918252602090912001546001600160a01b0316611269565b610fdd610c3f5a84906116b2565b92505a601080549193506000610ff283611aa5565b9190505550808061100290611aa5565b915050610f44565b6000546001600160a01b0316331461102157600080fd5b601593909355601691909155601d55601e55565b6000546001600160a01b0316331461104c57600080fd5b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611095573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b991906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b0316918391506000906110ff576110ff611a0f565b6001600160a01b039283166020918202929092010152600180548351921691839190811061112f5761112f611a0f565b6001600160a01b039283166020918202929092010152600854604051637ff36ab560e01b8152911690637ff36ab590349061117590600090869030904290600401611a25565b6000604051808303818588803b15801561118e57600080fd5b505af11580156111a2573d6000803e3d6000fd5b50506001546040516370a0823160e01b8152306004820152600094506111e093508692506001600160a01b03909116906370a082319060240161087a565b600154604051630852cd8d60e31b8152600481018390529192506001600160a01b0316906342966c6890602401600060405180830381600087803b15801561122757600080fd5b505af115801561123b573d6000803e3d6000fd5b505060175461124d92509050826116fd565b601755505050565b61125e33611269565b611267336113a4565b565b6001600160a01b0381166000908152600e6020526040812054900361128b5750565b600061129682610aeb565b905080156113a0576012546112ab90826116fd565b60125560015460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af1158015611301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113259190611abe565b506001600160a01b0382166000908152600b60209081526040808320429055600e90915290206002015461135990826116fd565b6001600160a01b0383166000908152600e6020526040902060028101919091555461138390611761565b6001600160a01b0383166000908152600e60205260409020600101555b5050565b6001600160a01b0381166000908152600e602052604081205490036113c65750565b60006113d182610c7a565b905080156113a057601a546113e690826116fd565b601a5560025460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561143c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114609190611abe565b506001600160a01b0382166000908152600d60209081526040808320429055600e90915290206004015461149490826116fd565b6001600160a01b0383166000908152600e602052604090206004810191909155546106b09061177e565b600980546114ce90600190611ae0565b815481106114de576114de611a0f565b60009182526020808320909101546001600160a01b038481168452600a90925260409092205460098054929093169291811061151c5761151c611a0f565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600a918290526040812054600980549193929161156890600190611ae0565b8154811061157857611578611a0f565b60009182526020808320909101546001600160a01b03168352820192909252604001902055600980546115ad90600190611ae0565b815481106115bd576115bd611a0f565b60009182526020808320909101546001600160a01b038481168452600c9092526040909220546009805492909316929181106115fb576115fb611a0f565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600c918290526040812054600980549193929161164790600190611ae0565b8154811061165757611657611a0f565b60009182526020808320909101546001600160a01b03168352820192909252604001902055600980548061168d5761168d611af3565b600082815260209020810160001990810180546001600160a01b031916905501905550565b60006116f483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118e2565b90505b92915050565b60008061170a8385611b09565b9050838110156116f45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064015b60405180910390fd5b60006116f76014546108ec6013548561179b90919063ffffffff16565b60006116f7601c546108ec601b548561179b90919063ffffffff16565b6000826000036117ad575060006116f7565b60006117b98385611b1c565b9050826117c68583611b33565b146116f45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401611758565b60006116f483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061191c565b601d546001600160a01b0382166000908152600d6020526040812054909142916118899190611b09565b1080156116f75750601e5461189d83610c7a565b1192915050565b6015546001600160a01b0382166000908152600b6020526040812054909142916118ce9190611b09565b1080156116f7575060165461189d83610aeb565b600081848411156119065760405162461bcd60e51b81526004016117589190611b55565b5060006119138486611ae0565b95945050505050565b6000818361193d5760405162461bcd60e51b81526004016117589190611b55565b5060006119138486611b33565b80356001600160a01b038116811461196157600080fd5b919050565b6000806040838503121561197957600080fd5b6119828361194a565b946020939093013593505050565b6000602082840312156119a257600080fd5b6116f48261194a565b6000602082840312156119bd57600080fd5b5035919050565b600080600080608085870312156119da57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208284031215611a0857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015611a6f5784516001600160a01b031683529383019391830191600101611a4a565b50506001600160a01b039690961660408501525050506060015292915050565b634e487b7160e01b600052601160045260246000fd5b600060018201611ab757611ab7611a8f565b5060010190565b600060208284031215611ad057600080fd5b815180151581146116f457600080fd5b818103818111156116f7576116f7611a8f565b634e487b7160e01b600052603160045260246000fd5b808201808211156116f7576116f7611a8f565b80820281158282048414176116f7576116f7611a8f565b600082611b5057634e487b7160e01b600052601260045260246000fd5b500490565b600060208083528351808285015260005b81811015611b8257858101830151858201604001528201611b66565b506000604082860101526040601f19601f830116850101925050509291505056fea2646970667358221220da1d35693de099a1954551805d8cc5e1d1453753183a1d380cdb7600972d245e64736f6c6343000814003300000000000000000000000098bf93ebf5c380c0e6ae8e192a7e2ae08edacc02000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9000000000000000000000000eb45a3c4aedd0f47f345fb4c8a1802bb5740d725

Deployed ByteCode

0x6080604052600436106101d15760003560e01c806389ed7965116100f7578063ce7c2ac211610095578063df137cf611610064578063df137cf6146104c8578063e0bf82ec146104de578063ef7c3a39146104fe578063f0fc6bca1461050657600080fd5b8063ce7c2ac214610414578063d56916b014610486578063d9cb19df1461049c578063dd728075146104b257600080fd5b80639946b1d7116100d15780639946b1d7146103b2578063b1ae2ada146103d2578063c56b7fc1146103e8578063c702ee3f146103fe57600080fd5b806389ed79651461037457806389fa276d1461037c5780638d5396e91461039257600080fd5b80634bdeabe81161016f5780636bdb4f711161013e5780636bdb4f71146103085780636d2b49401461031e5780637a9a97d71461033e57806383b922181461035e57600080fd5b80634bdeabe8146102845780634f15999a146102a45780635cbe2777146102dc57806364ec8299146102f257600080fd5b80632b46c77a116101ab5780632b46c77a1461020f5780632d98b6d7146102385780633a98ef391461025857806342dc72a11461026e57600080fd5b806314b6ca96146101dd57806317515488146101ff5780631adb88b31461020757600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b506101fd6101f8366004611966565b61051b565b005b6101fd6106d3565b6101fd610903565b34801561021b57600080fd5b5061022560135481565b6040519081526020015b60405180910390f35b34801561024457600080fd5b50610225610253366004611990565b610aeb565b34801561026457600080fd5b50610225600f5481565b34801561027a57600080fd5b50610225601c5481565b34801561029057600080fd5b506101fd61029f3660046119ab565b610b76565b3480156102b057600080fd5b506007546102c4906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b3480156102e857600080fd5b5061022560125481565b3480156102fe57600080fd5b5061022560155481565b34801561031457600080fd5b5061022560115481565b34801561032a57600080fd5b506008546102c4906001600160a01b031681565b34801561034a57600080fd5b50610225610359366004611990565b610c7a565b34801561036a57600080fd5b50610225601f5481565b6101fd610cf3565b34801561038857600080fd5b50610225601d5481565b34801561039e57600080fd5b506006546102c4906001600160a01b031681565b3480156103be57600080fd5b506101fd6103cd3660046119ab565b610f14565b3480156103de57600080fd5b5061022560175481565b3480156103f457600080fd5b50610225601b5481565b34801561040a57600080fd5b5061022560195481565b34801561042057600080fd5b5061045e61042f366004611990565b600e60205260009081526040902080546001820154600283015460038401546004909401549293919290919085565b604080519586526020860194909452928401919091526060830152608082015260a00161022f565b34801561049257600080fd5b5061022560165481565b3480156104a857600080fd5b50610225601e5481565b3480156104be57600080fd5b5061022560145481565b3480156104d457600080fd5b50610225601a5481565b3480156104ea57600080fd5b506101fd6104f93660046119c4565b61100a565b6101fd611035565b34801561051257600080fd5b506101fd611255565b6000546001600160a01b0316331461053257600080fd5b6001600160a01b0382166000908152600e6020526040902054156105625761055982611269565b610562826113a4565b60008111801561058857506001600160a01b0382166000908152600e6020526040902054155b156105fb57600980546001600160a01b0384166000818152600a60209081526040808320859055600c9091528120839055600183018455929092527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b031916909117905561062e565b8015801561062057506001600160a01b0382166000908152600e602052604090205415155b1561062e5761062e826114be565b6001600160a01b0382166000908152600e6020526040902054600f5461065f918391610659916116b2565b906116fd565b600f556001600160a01b0382166000908152600e6020526040902081905561068681611761565b6001600160a01b0383166000908152600e602052604090206001810191909155546106b09061177e565b6001600160a01b039092166000908152600e602052604090206003019190915550565b6000546001600160a01b031633146106ea57600080fd5b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610733573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075791906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b03169183915060009061079d5761079d611a0f565b6001600160a01b03928316602091820292909201015260018054835192169183919081106107cd576107cd611a0f565b6001600160a01b039283166020918202929092010152600854604051637ff36ab560e01b8152911690637ff36ab590349061081390600090869030904290600401611a25565b6000604051808303818588803b15801561082c57600080fd5b505af1158015610840573d6000803e3d6000fd5b50506001546040516370a0823160e01b8152306004820152600094506108c193508692506001600160a01b03909116906370a08231906024015b602060405180830381865afa158015610897573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bb91906119f6565b906116b2565b6011549091506108d190826116fd565b601155600f546014546108fb916108f2916108ec908561179b565b9061181d565b601354906116fd565b601355505050565b6000546001600160a01b0316331461091a57600080fd5b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610963573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098791906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b0316918391506000906109cd576109cd611a0f565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106109fe576109fe611a0f565b6001600160a01b039283166020918202929092010152600654604051637ff36ab560e01b8152911690637ff36ab5903490610a4490600090869030904290600401611a25565b6000604051808303818588803b158015610a5d57600080fd5b505af1158015610a71573d6000803e3d6000fd5b50506002546040516370a0823160e01b815230600482015260009450610aaf93508692506001600160a01b03909116906370a082319060240161087a565b601954909150610abf90826116fd565b601955600f54601c54610ae391610ada916108ec908561179b565b601b54906116fd565b601b55505050565b6001600160a01b0381166000908152600e60205260408120548103610b1257506000919050565b6001600160a01b0382166000908152600e6020526040812054610b3490611761565b6001600160a01b0384166000908152600e6020526040902060010154909150808211610b64575060009392505050565b610b6e82826116b2565b949350505050565b6000546001600160a01b03163314610b8d57600080fd5b6009546000819003610b9d575050565b6000805a905060005b8483108015610bb457508381105b15610c73578360185410610bc85760006018555b610bfa600960185481548110610be057610be0611a0f565b6000918252602090912001546001600160a01b031661185f565b15610c3157610c31600960185481548110610c1757610c17611a0f565b6000918252602090912001546001600160a01b03166113a4565b610c46610c3f5a84906116b2565b84906116fd565b92505a601880549193506000610c5b83611aa5565b91905055508080610c6b90611aa5565b915050610ba6565b5050505050565b6001600160a01b0381166000908152600e60205260408120548103610ca157506000919050565b6001600160a01b0382166000908152600e6020526040812054610cc39061177e565b6001600160a01b0384166000908152600e6020526040902060030154909150808211610b64575060009392505050565b6000546001600160a01b03163314610d0a57600080fd5b6003546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7791906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b031691839150600090610dbd57610dbd611a0f565b6001600160a01b039283166020918202929092010152600354825191169082906001908110610dee57610dee611a0f565b6001600160a01b039283166020918202929092010152600854604051637ff36ab560e01b8152911690637ff36ab5903490610e3490600090869030904290600401611a25565b6000604051808303818588803b158015610e4d57600080fd5b505af1158015610e61573d6000803e3d6000fd5b50506003546040516370a0823160e01b815230600482015260009450610e9f93508692506001600160a01b03909116906370a082319060240161087a565b600354604051630852cd8d60e31b8152600481018390529192506001600160a01b0316906342966c6890602401600060405180830381600087803b158015610ee657600080fd5b505af1158015610efa573d6000803e3d6000fd5b5050601f54610f0c92509050826116fd565b601f55505050565b6000546001600160a01b03163314610f2b57600080fd5b6009546000819003610f3b575050565b6000805a905060005b8483108015610f5257508381105b15610c73578360105410610f665760006010555b610f98600960105481548110610f7e57610f7e611a0f565b6000918252602090912001546001600160a01b03166118a4565b15610fcf57610fcf600960105481548110610fb557610fb5611a0f565b6000918252602090912001546001600160a01b0316611269565b610fdd610c3f5a84906116b2565b92505a601080549193506000610ff283611aa5565b9190505550808061100290611aa5565b915050610f44565b6000546001600160a01b0316331461102157600080fd5b601593909355601691909155601d55601e55565b6000546001600160a01b0316331461104c57600080fd5b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611095573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b991906119f6565b6040805160028082526060820183529293506000929091602083019080368337505060045482519293506001600160a01b0316918391506000906110ff576110ff611a0f565b6001600160a01b039283166020918202929092010152600180548351921691839190811061112f5761112f611a0f565b6001600160a01b039283166020918202929092010152600854604051637ff36ab560e01b8152911690637ff36ab590349061117590600090869030904290600401611a25565b6000604051808303818588803b15801561118e57600080fd5b505af11580156111a2573d6000803e3d6000fd5b50506001546040516370a0823160e01b8152306004820152600094506111e093508692506001600160a01b03909116906370a082319060240161087a565b600154604051630852cd8d60e31b8152600481018390529192506001600160a01b0316906342966c6890602401600060405180830381600087803b15801561122757600080fd5b505af115801561123b573d6000803e3d6000fd5b505060175461124d92509050826116fd565b601755505050565b61125e33611269565b611267336113a4565b565b6001600160a01b0381166000908152600e6020526040812054900361128b5750565b600061129682610aeb565b905080156113a0576012546112ab90826116fd565b60125560015460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af1158015611301573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113259190611abe565b506001600160a01b0382166000908152600b60209081526040808320429055600e90915290206002015461135990826116fd565b6001600160a01b0383166000908152600e6020526040902060028101919091555461138390611761565b6001600160a01b0383166000908152600e60205260409020600101555b5050565b6001600160a01b0381166000908152600e602052604081205490036113c65750565b60006113d182610c7a565b905080156113a057601a546113e690826116fd565b601a5560025460405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af115801561143c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114609190611abe565b506001600160a01b0382166000908152600d60209081526040808320429055600e90915290206004015461149490826116fd565b6001600160a01b0383166000908152600e602052604090206004810191909155546106b09061177e565b600980546114ce90600190611ae0565b815481106114de576114de611a0f565b60009182526020808320909101546001600160a01b038481168452600a90925260409092205460098054929093169291811061151c5761151c611a0f565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600a918290526040812054600980549193929161156890600190611ae0565b8154811061157857611578611a0f565b60009182526020808320909101546001600160a01b03168352820192909252604001902055600980546115ad90600190611ae0565b815481106115bd576115bd611a0f565b60009182526020808320909101546001600160a01b038481168452600c9092526040909220546009805492909316929181106115fb576115fb611a0f565b600091825260208083209190910180546001600160a01b0319166001600160a01b039485161790559183168152600c918290526040812054600980549193929161164790600190611ae0565b8154811061165757611657611a0f565b60009182526020808320909101546001600160a01b03168352820192909252604001902055600980548061168d5761168d611af3565b600082815260209020810160001990810180546001600160a01b031916905501905550565b60006116f483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506118e2565b90505b92915050565b60008061170a8385611b09565b9050838110156116f45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064015b60405180910390fd5b60006116f76014546108ec6013548561179b90919063ffffffff16565b60006116f7601c546108ec601b548561179b90919063ffffffff16565b6000826000036117ad575060006116f7565b60006117b98385611b1c565b9050826117c68583611b33565b146116f45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401611758565b60006116f483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061191c565b601d546001600160a01b0382166000908152600d6020526040812054909142916118899190611b09565b1080156116f75750601e5461189d83610c7a565b1192915050565b6015546001600160a01b0382166000908152600b6020526040812054909142916118ce9190611b09565b1080156116f7575060165461189d83610aeb565b600081848411156119065760405162461bcd60e51b81526004016117589190611b55565b5060006119138486611ae0565b95945050505050565b6000818361193d5760405162461bcd60e51b81526004016117589190611b55565b5060006119138486611b33565b80356001600160a01b038116811461196157600080fd5b919050565b6000806040838503121561197957600080fd5b6119828361194a565b946020939093013593505050565b6000602082840312156119a257600080fd5b6116f48261194a565b6000602082840312156119bd57600080fd5b5035919050565b600080600080608085870312156119da57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208284031215611a0857600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b600060808201868352602060808185015281875180845260a086019150828901935060005b81811015611a6f5784516001600160a01b031683529383019391830191600101611a4a565b50506001600160a01b039690961660408501525050506060015292915050565b634e487b7160e01b600052601160045260246000fd5b600060018201611ab757611ab7611a8f565b5060010190565b600060208284031215611ad057600080fd5b815180151581146116f457600080fd5b818103818111156116f7576116f7611a8f565b634e487b7160e01b600052603160045260246000fd5b808201808211156116f7576116f7611a8f565b80820281158282048414176116f7576116f7611a8f565b600082611b5057634e487b7160e01b600052601260045260246000fd5b500490565b600060208083528351808285015260005b81811015611b8257858101830151858201604001528201611b66565b506000604082860101526040601f19601f830116850101925050509291505056fea2646970667358221220da1d35693de099a1954551805d8cc5e1d1453753183a1d380cdb7600972d245e64736f6c63430008140033