Contract 0xA10f56A58A7484Cf7d640246eD78D9c98e38c401

 
Txn Hash Method
Block
From
To
Value
0x665f3f5f5cfa22e705a14978ce24b5059ae0d70d3c5046753f82ffb9374942680x6080604030373122023-08-24 7:59:31239 days 21 hrs ago0x5aab1dae1ef9d93b7095d9de9c0ebb150d0c37f0 IN  Create: StakingThalesBonusRewardsManager0 ETH0.0042856802931
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StakingThalesBonusRewardsManager

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : StakingThalesBonusRewardsManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "../utils/proxy/solidity-0.8.0/ProxyOwned.sol";
import "../utils/proxy/solidity-0.8.0/ProxyPausable.sol";
import "../utils/proxy/solidity-0.8.0/ProxyReentrancyGuard.sol";

import "../interfaces/IStakingThales.sol";
import "../interfaces/IVault.sol";
import "../interfaces/IPositionalMarketManagerTruncated.sol";

import "../utils/libraries/AddressSetLib.sol";

contract StakingThalesBonusRewardsManager is ProxyOwned, Initializable, ProxyReentrancyGuard {
    using AddressSetLib for AddressSetLib.AddressSet;

    uint private constant ONE = 1e18;

    struct LeaderboardStakerData {
        uint share;
        uint stakingMultiplier;
        uint userVaultBasePointsPerRound;
        uint userVaultPointsPerRound;
        uint userLPBasePointsPerRound;
        uint userLPPointsPerRound;
        uint userTradingBasePointsPerRound;
        uint userRoundBonusPoints;
    }

    /// @return the adddress of the staking contract
    address public stakingThales;

    uint public stakingBaseDivider;

    uint public maxStakingMultiplier;

    uint public vaultsMultiplier;
    uint public lpMultiplier;
    uint public tradingMultiplier;

    mapping(address => mapping(uint => uint)) public userVaultBasePointsPerRound;
    mapping(address => mapping(uint => uint)) public userLPBasePointsPerRound;
    mapping(address => mapping(uint => uint)) public userTradingBasePointsPerRound;
    mapping(address => mapping(uint => uint)) public userRoundBonusPoints;

    mapping(uint => uint) public totalVaultBasePointsPerRound;
    mapping(uint => uint) public totalLPBasePointsPerRound;
    mapping(uint => uint) public totalTradingBasePointsPerRound;
    mapping(uint => uint) public totalRoundBonusPoints;

    mapping(address => bool) public knownVaults;
    mapping(address => bool) public knownLiquidityPools;
    mapping(address => bool) public knownTradingAMMs;

    bool public useNewBonusModel;

    AddressSetLib.AddressSet internal vaults;
    AddressSetLib.AddressSet internal lps;

    struct EstimatedLeaderboardStakerData {
        uint stakingMultiplier;
        uint userVaultPointsPerRound;
        uint userLPPointsPerRound;
        uint userTradingPointsPerRound;
    }

    IPositionalMarketManagerTruncated public manager;

    function initialize(address _owner, address _stakingThales) public initializer {
        setOwner(_owner);
        initNonReentrant();
        stakingThales = _stakingThales;
    }

    /// @notice Save gamified staking bonus points
    /// @param user to save points for
    /// @param origin where the points originated from (vaults, lp or trading)
    /// @param basePoints how many points were scored
    /// @param round in which round to store the points
    function storePoints(
        address user,
        address origin,
        uint basePoints,
        uint round
    ) external {
        require(msg.sender == stakingThales, "Only allowed from StakingThales");
        require(
            knownVaults[origin] || knownLiquidityPools[origin] || knownTradingAMMs[origin],
            "Only allowed for known origin"
        );
        if (IStakingThales(stakingThales).stakedBalanceOf(user) > 0) {
            uint multiplierToUse;
            if (knownVaults[origin]) {
                userVaultBasePointsPerRound[user][round] += basePoints;
                totalVaultBasePointsPerRound[round] += basePoints;
                multiplierToUse = vaultsMultiplier;
            } else if (knownLiquidityPools[origin]) {
                userLPBasePointsPerRound[user][round] += basePoints;
                totalLPBasePointsPerRound[round] += basePoints;
                multiplierToUse = lpMultiplier;
            } else if (knownTradingAMMs[origin]) {
                userTradingBasePointsPerRound[user][round] += basePoints;
                totalTradingBasePointsPerRound[round] += basePoints;
                multiplierToUse = tradingMultiplier;
            }
            uint newBonusPoints = ((ONE + getStakingMultiplier(user)) * ((basePoints * multiplierToUse) / ONE)) / ONE;
            userRoundBonusPoints[user][round] += newBonusPoints;
            totalRoundBonusPoints[round] += newBonusPoints;
            emit PointsStored(user, origin, basePoints, round);
        }
    }

    /// @notice Setting the SportAMMLiquidityPool
    /// @param _stakingThales Address of Staking contract
    function setStakingThales(address _stakingThales) external onlyOwner {
        stakingThales = _stakingThales;
        emit SetStakingThales(_stakingThales);
    }

    /// @notice Register or unregister a known vault to accept vault points from
    function setKnownVault(address vault, bool value) external onlyOwner {
        knownVaults[vault] = value;
        if (value) {
            vaults.add(vault);
        } else {
            vaults.remove(vault);
        }
        emit SetKnownVault(vault, value);
    }

    /// @notice Register or unregister a known liquidity pool to accept lp points from
    function setKnownLiquidityPool(address pool, bool value) external onlyOwner {
        knownLiquidityPools[pool] = value;
        if (value) {
            lps.add(pool);
        } else {
            lps.remove(pool);
        }
        emit SetKnownLiquidityPool(pool, value);
    }

    /// @notice Register or unregister a known AMM to accept trading points from
    function setKnownTradingAMM(address amm, bool value) external onlyOwner {
        knownTradingAMMs[amm] = value;
        emit SetKnownTradingAMM(amm, value);
    }

    /// @notice A value to use for the staking multiplier, e.g. 100k on Optimism
    function setStakingBaseDivider(uint value) external onlyOwner {
        stakingBaseDivider = value;
        emit SetStakingBaseDivider(value);
    }

    /// @notice Maximum value of Staking Multiplier
    function setMaxStakingMultiplier(uint value) external onlyOwner {
        maxStakingMultiplier = value;
        emit SetMaxStakingMultiplier(value);
    }

    /// @notice set multiplers for each category
    function setMultipliers(
        uint _vaultsMultiplier,
        uint _lpMultiplier,
        uint _tradingMultiplier
    ) external onlyOwner {
        vaultsMultiplier = _vaultsMultiplier;
        lpMultiplier = _lpMultiplier;
        tradingMultiplier = _tradingMultiplier;
        emit SetMultipliers(_vaultsMultiplier, _lpMultiplier, _tradingMultiplier);
    }

    /// @notice a boolean to use for when to turn the new model on.
    function setUseNewModel(bool value) external onlyOwner {
        useNewBonusModel = value;
        emit SetUseNewModel(value);
    }

    /// @notice add known vaults array
    function addVaults(address[] calldata _vaults, bool add) external onlyOwner {
        require(_vaults.length > 0, "vaults addresses cannot be empty");
        for (uint i = 0; i < _vaults.length; i++) {
            if (add) {
                vaults.add(_vaults[i]);
            } else {
                vaults.remove(_vaults[i]);
            }
        }
    }

    /// @notice add known lps array
    function addLPs(address[] calldata _lps, bool add) external onlyOwner {
        require(_lps.length > 0, "_lps addresses cannot be empty");
        for (uint i = 0; i < _lps.length; i++) {
            if (add) {
                lps.add(_lps[i]);
            } else {
                lps.remove(_lps[i]);
            }
        }
    }

    function setManager(address _manager) external onlyOwner {
        manager = IPositionalMarketManagerTruncated(_manager);
        emit ManagerChanged(_manager);
    }

    //***********************VIEWS***********************

    /// @notice return the share of bonus rewards per user per round.
    function getUserRoundBonusShare(address user, uint round) public view returns (uint userShare) {
        if (totalRoundBonusPoints[round] > 0) {
            userShare = (userRoundBonusPoints[user][round] * ONE) / totalRoundBonusPoints[round];
        }
    }

    /// @notice return the staking multipler per user
    function getStakingMultiplier(address user) public view returns (uint) {
        uint calculatedMultiplier = IStakingThales(stakingThales).stakedBalanceOf(user) / stakingBaseDivider;
        return calculatedMultiplier < maxStakingMultiplier ? calculatedMultiplier : maxStakingMultiplier;
    }

    /// @notice return leaderboard data
    function getStakersLeaderboardData(address[] calldata stakers, uint round)
        external
        view
        returns (LeaderboardStakerData[] memory)
    {
        LeaderboardStakerData[] memory stakersArray = new LeaderboardStakerData[](stakers.length);

        for (uint i = 0; i < stakers.length; i++) {
            stakersArray[i].share = getUserRoundBonusShare(stakers[i], round);
            stakersArray[i].stakingMultiplier = getStakingMultiplier(stakers[i]);
            stakersArray[i].userVaultBasePointsPerRound = userVaultBasePointsPerRound[stakers[i]][round];
            stakersArray[i].userLPBasePointsPerRound = userLPBasePointsPerRound[stakers[i]][round];
            stakersArray[i].userVaultPointsPerRound =
                (userVaultBasePointsPerRound[stakers[i]][round] * vaultsMultiplier) /
                ONE;
            stakersArray[i].userLPPointsPerRound = (userLPBasePointsPerRound[stakers[i]][round] * lpMultiplier) / ONE;
            stakersArray[i].userTradingBasePointsPerRound = userTradingBasePointsPerRound[stakers[i]][round];
            stakersArray[i].userRoundBonusPoints = userRoundBonusPoints[stakers[i]][round];
        }
        return stakersArray;
    }

    /// @notice return estimated leaderboard data
    function getEstimatedCurrentStakersLeaderboardData(address[] calldata stakers, uint round)
        external
        view
        returns (EstimatedLeaderboardStakerData[] memory)
    {
        EstimatedLeaderboardStakerData[] memory stakersArray = new EstimatedLeaderboardStakerData[](stakers.length);

        for (uint i = 0; i < stakers.length; i++) {
            stakersArray[i].stakingMultiplier = getStakingMultiplier(stakers[i]);
            stakersArray[i].userVaultPointsPerRound = getEstimatedCurrentVaultPoints(stakers[i]);
            stakersArray[i].userLPPointsPerRound = getEstimatedCurrentLPsPoints(stakers[i]);
            stakersArray[i].userTradingPointsPerRound = userTradingBasePointsPerRound[stakers[i]][round];
        }
        return stakersArray;
    }

    function getEstimatedCurrentVaultPoints(address user) public view returns (uint estimatedPoints) {
        uint numVaults = vaults.elements.length;
        address[] memory vaultsIterable = vaults.getPage(0, numVaults);
        for (uint i = 0; i < vaultsIterable.length; i++) {
            uint vaultRound = IVault(vaultsIterable[i]).round();
            uint vaultPoints = (IVault(vaultsIterable[i]).balancesPerRound(vaultRound, user) * vaultsMultiplier) / ONE;
            if (address(manager) != address(0)) {
                vaultPoints = manager.reverseTransformCollateral(vaultPoints);
            }
            estimatedPoints += vaultPoints;
        }
    }

    function getEstimatedCurrentLPsPoints(address user) public view returns (uint estimatedPoints) {
        uint numLPs = lps.elements.length;
        address[] memory vaultsIterable = lps.getPage(0, numLPs);
        for (uint i = 0; i < vaultsIterable.length; i++) {
            uint vaultRound = IVault(vaultsIterable[i]).round();
            uint vaultPoints = (IVault(vaultsIterable[i]).balancesPerRound(vaultRound, user) * lpMultiplier) / ONE;
            if (address(manager) != address(0)) {
                vaultPoints = manager.reverseTransformCollateral(vaultPoints);
            }
            estimatedPoints += vaultPoints;
        }
    }

    event ManagerChanged(address manager);
    event SetStakingThales(address _stakingThales);
    event PointsStored(address user, address origin, uint basePoints, uint round);
    event SetKnownVault(address vault, bool value);
    event SetKnownLiquidityPool(address pool, bool value);
    event SetKnownTradingAMM(address amm, bool value);
    event SetMultipliers(uint _vaultsMultiplier, uint _lpMultiplier, uint _tradingMultiplier);
    event SetStakingBaseDivider(uint value);
    event SetMaxStakingMultiplier(uint value);
    event SetUseNewModel(bool value);
}

File 2 of 10 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 3 of 10 : ProxyOwned.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// Clone of syntetix contract without constructor
contract ProxyOwned {
    address public owner;
    address public nominatedOwner;
    bool private _initialized;
    bool private _transferredAtInit;

    function setOwner(address _owner) public {
        require(_owner != address(0), "Owner address cannot be 0");
        require(!_initialized, "Already initialized, use nominateNewOwner");
        _initialized = true;
        owner = _owner;
        emit OwnerChanged(address(0), _owner);
    }

    function nominateNewOwner(address _owner) external onlyOwner {
        nominatedOwner = _owner;
        emit OwnerNominated(_owner);
    }

    function acceptOwnership() external {
        require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership");
        emit OwnerChanged(owner, nominatedOwner);
        owner = nominatedOwner;
        nominatedOwner = address(0);
    }

    function transferOwnershipAtInit(address proxyAddress) external onlyOwner {
        require(proxyAddress != address(0), "Invalid address");
        require(!_transferredAtInit, "Already transferred");
        owner = proxyAddress;
        _transferredAtInit = true;
        emit OwnerChanged(owner, proxyAddress);
    }

    modifier onlyOwner {
        _onlyOwner();
        _;
    }

    function _onlyOwner() private view {
        require(msg.sender == owner, "Only the contract owner may perform this action");
    }

    event OwnerNominated(address newOwner);
    event OwnerChanged(address oldOwner, address newOwner);
}

File 4 of 10 : ProxyPausable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// Inheritance
import "./ProxyOwned.sol";

// Clone of syntetix contract without constructor

contract ProxyPausable is ProxyOwned {
    uint public lastPauseTime;
    bool public paused;

    

    /**
     * @notice Change the paused state of the contract
     * @dev Only the contract owner may call this.
     */
    function setPaused(bool _paused) external onlyOwner {
        // Ensure we're actually changing the state before we do anything
        if (_paused == paused) {
            return;
        }

        // Set our paused state.
        paused = _paused;

        // If applicable, set the last pause time.
        if (paused) {
            lastPauseTime = block.timestamp;
        }

        // Let everyone know that our pause state has changed.
        emit PauseChanged(paused);
    }

    event PauseChanged(bool isPaused);

    modifier notPaused {
        require(!paused, "This action cannot be performed while the contract is paused");
        _;
    }
}

File 5 of 10 : ProxyReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier
 * available, which can be aplied 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.
 */
contract ProxyReentrancyGuard {
    /// @dev counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;
    bool private _initialized;

    function initNonReentrant() public {
        require(!_initialized, "Already initialized");
        _initialized = true;
        _guardCounter = 1;
    }

    /**
     * @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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

File 6 of 10 : IStakingThales.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.5.16;

interface IStakingThales {
    function updateVolume(address account, uint amount) external;

    /* ========== VIEWS / VARIABLES ==========  */
    function totalStakedAmount() external view returns (uint);

    function stakedBalanceOf(address account) external view returns (uint);

    function currentPeriodRewards() external view returns (uint);

    function currentPeriodFees() external view returns (uint);

    function getLastPeriodOfClaimedRewards(address account) external view returns (uint);

    function getRewardsAvailable(address account) external view returns (uint);

    function getRewardFeesAvailable(address account) external view returns (uint);

    function getAlreadyClaimedRewards(address account) external view returns (uint);

    function getContractRewardFunds() external view returns (uint);

    function getContractFeeFunds() external view returns (uint);

    function getAMMVolume(address account) external view returns (uint);
}

File 7 of 10 : IVault.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IVault {
    function balancesPerRound(uint _round, address user) external view returns (uint);

    function round() external view returns (uint);
}

File 8 of 10 : IPositionalMarketManagerTruncated.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IPositionalMarketManagerTruncated {
    function transformCollateral(uint value) external view returns (uint);

    function reverseTransformCollateral(uint value) external view returns (uint);
}

File 9 of 10 : AddressSetLib.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library AddressSetLib {
    struct AddressSet {
        address[] elements;
        mapping(address => uint) indices;
    }

    function contains(AddressSet storage set, address candidate) internal view returns (bool) {
        if (set.elements.length == 0) {
            return false;
        }
        uint index = set.indices[candidate];
        return index != 0 || set.elements[0] == candidate;
    }

    function getPage(
        AddressSet storage set,
        uint index,
        uint pageSize
    ) internal view returns (address[] memory) {
        // NOTE: This implementation should be converted to slice operators if the compiler is updated to v0.6.0+
        uint endIndex = index + pageSize; // The check below that endIndex <= index handles overflow.

        // If the page extends past the end of the list, truncate it.
        if (endIndex > set.elements.length) {
            endIndex = set.elements.length;
        }
        if (endIndex <= index) {
            return new address[](0);
        }

        uint n = endIndex - index; // We already checked for negative overflow.
        address[] memory page = new address[](n);
        for (uint i; i < n; i++) {
            page[i] = set.elements[i + index];
        }
        return page;
    }

    function add(AddressSet storage set, address element) internal {
        // Adding to a set is an idempotent operation.
        if (!contains(set, element)) {
            set.indices[element] = set.elements.length;
            set.elements.push(element);
        }
    }

    function remove(AddressSet storage set, address element) internal {
        require(contains(set, element), "Element not in set.");
        // Replace the removed element with the last element of the list.
        uint index = set.indices[element];
        uint lastIndex = set.elements.length - 1; // We required that element is in the list, so it is not empty.
        if (index != lastIndex) {
            // No need to shift the last element if it is the one we want to delete.
            address shiftedElement = set.elements[lastIndex];
            set.elements[index] = shiftedElement;
            set.indices[shiftedElement] = index;
        }
        set.elements.pop();
        delete set.indices[element];
    }
}

File 10 of 10 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"manager","type":"address"}],"name":"ManagerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"origin","type":"address"},{"indexed":false,"internalType":"uint256","name":"basePoints","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"round","type":"uint256"}],"name":"PointsStored","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SetKnownLiquidityPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"amm","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SetKnownTradingAMM","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SetKnownVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SetMaxStakingMultiplier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_vaultsMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_lpMultiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tradingMultiplier","type":"uint256"}],"name":"SetMultipliers","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"SetStakingBaseDivider","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_stakingThales","type":"address"}],"name":"SetStakingThales","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"value","type":"bool"}],"name":"SetUseNewModel","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_lps","type":"address[]"},{"internalType":"bool","name":"add","type":"bool"}],"name":"addLPs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_vaults","type":"address[]"},{"internalType":"bool","name":"add","type":"bool"}],"name":"addVaults","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getEstimatedCurrentLPsPoints","outputs":[{"internalType":"uint256","name":"estimatedPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"stakers","type":"address[]"},{"internalType":"uint256","name":"round","type":"uint256"}],"name":"getEstimatedCurrentStakersLeaderboardData","outputs":[{"components":[{"internalType":"uint256","name":"stakingMultiplier","type":"uint256"},{"internalType":"uint256","name":"userVaultPointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userLPPointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userTradingPointsPerRound","type":"uint256"}],"internalType":"struct StakingThalesBonusRewardsManager.EstimatedLeaderboardStakerData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getEstimatedCurrentVaultPoints","outputs":[{"internalType":"uint256","name":"estimatedPoints","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"stakers","type":"address[]"},{"internalType":"uint256","name":"round","type":"uint256"}],"name":"getStakersLeaderboardData","outputs":[{"components":[{"internalType":"uint256","name":"share","type":"uint256"},{"internalType":"uint256","name":"stakingMultiplier","type":"uint256"},{"internalType":"uint256","name":"userVaultBasePointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userVaultPointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userLPBasePointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userLPPointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userTradingBasePointsPerRound","type":"uint256"},{"internalType":"uint256","name":"userRoundBonusPoints","type":"uint256"}],"internalType":"struct StakingThalesBonusRewardsManager.LeaderboardStakerData[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getStakingMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"round","type":"uint256"}],"name":"getUserRoundBonusShare","outputs":[{"internalType":"uint256","name":"userShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initNonReentrant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_stakingThales","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"knownLiquidityPools","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"knownTradingAMMs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"knownVaults","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"contract IPositionalMarketManagerTruncated","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxStakingMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"nominateNewOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setKnownLiquidityPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"amm","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setKnownTradingAMM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setKnownVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"name":"setManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setMaxStakingMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_vaultsMultiplier","type":"uint256"},{"internalType":"uint256","name":"_lpMultiplier","type":"uint256"},{"internalType":"uint256","name":"_tradingMultiplier","type":"uint256"}],"name":"setMultipliers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setStakingBaseDivider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_stakingThales","type":"address"}],"name":"setStakingThales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setUseNewModel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingBaseDivider","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingThales","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"origin","type":"address"},{"internalType":"uint256","name":"basePoints","type":"uint256"},{"internalType":"uint256","name":"round","type":"uint256"}],"name":"storePoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalLPBasePointsPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalRoundBonusPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalTradingBasePointsPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalVaultBasePointsPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"proxyAddress","type":"address"}],"name":"transferOwnershipAtInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useNewBonusModel","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userLPBasePointsPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userRoundBonusPoints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userTradingBasePointsPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userVaultBasePointsPerRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultsMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50612adf806100206000396000f3fe608060405234801561001057600080fd5b506004361061027f5760003560e01c80637c2537681161015c578063b378143f116100ce578063e238b44c11610087578063e238b44c14610627578063ebc7977214610647578063f5a002331461064f578063faba327814610662578063fd8a8cc614610675578063fe69bd771461068d57600080fd5b8063b378143f1461058d578063c3b83f5f14610596578063c7297a60146105a9578063d0ebdbe7146105d4578063d9516791146105e7578063df022bf51461060757600080fd5b8063900e729011610120578063900e72901461050b5780639205dc8d1461052b57806397005f5e1461053e5780639c917a6b1461055e578063a86086b914610571578063b1404e651461057a57600080fd5b80637c253768146104ac5780637f852582146104bf5780638d61c38b146104d25780638da5cb5b146104e55780638fcfa5fa146104f857600080fd5b8063481c6a75116101f55780635bd90b48116101b95780635bd90b481461040b5780636bb6216e146104185780636ce46bc3146104435780636e53033d146104565780637684368a1461047957806379ba5097146104a457600080fd5b8063481c6a7514610394578063485cc955146103bf57806352a31c07146103d257806353a47bb7146103e557806356a23f33146103f857600080fd5b8063295f8d7911610247578063295f8d79146102ee5780632b3035f6146103015780632bea30021461030a5780632e8e6f2e14610335578063314102b61461036857806340dcc4d11461038b57600080fd5b806304fc1954146102845780630a6bb7f9146102a057806313af4035146102b55780631627540c146102c857806322ccdd88146102db575b600080fd5b61028d60065481565b6040519081526020015b60405180910390f35b6102b36102ae3660046127c3565b6106ad565b005b6102b36102c3366004612736565b610745565b6102b36102d6366004612736565b61087b565b6102b36102e9366004612815565b6108d1565b6102b36102fc3660046128b1565b6109d4565b61028d60085481565b61028d6103183660046127ec565b600c60209081526000928352604080842090915290825290205481565b610358610343366004612736565b60126020526000908152604090205460ff1681565b6040519015158152602001610297565b610358610376366004612736565b60136020526000908152604090205460ff1681565b61028d60055481565b6019546103a7906001600160a01b031681565b6040516001600160a01b039091168152602001610297565b6102b36103cd366004612750565b610a1d565b6102b36103e0366004612782565b610b1c565b6001546103a7906001600160a01b031681565b61028d610406366004612736565b610f49565b6014546103589060ff1681565b61028d6104263660046127ec565b600a60209081526000928352604080842090915290825290205481565b6102b36104513660046128fb565b610ffb565b610358610464366004612736565b60116020526000908152604090205460ff1681565b61028d6104873660046127ec565b600960209081526000928352604080842090915290825290205481565b6102b3611058565b6102b36104ba3660046128cb565b611142565b6102b36104cd366004612736565b61117f565b61028d6104e03660046127ec565b6111dd565b6000546103a7906001600160a01b031681565b6102b36105063660046127c3565b611246565b61028d6105193660046128cb565b600e6020526000908152604090205481565b6102b36105393660046127c3565b6112d6565b61055161054c366004612867565b61133a565b6040516102979190612926565b61028d61056c366004612736565b6115b8565b61028d60075481565b61028d610588366004612736565b61180b565b61028d60045481565b6102b36105a4366004612736565b611a56565b61028d6105b73660046127ec565b600b60209081526000928352604080842090915290825290205481565b6102b36105e2366004612736565b611b5f565b6105fa6105f5366004612867565b611bb5565b604051610297919061298a565b61028d6106153660046128cb565b60106020526000908152604090205481565b61028d6106353660046128cb565b600d6020526000908152604090205481565b6102b3612117565b6102b361065d366004612815565b612175565b6102b36106703660046128cb565b612272565b6003546103a79061010090046001600160a01b031681565b61028d61069b3660046128cb565b600f6020526000908152604090205481565b6106b56122af565b6001600160a01b0382166000908152601260205260409020805460ff191682158015919091179091556106f2576106ed601783612323565b6106fd565b6106fd601783612376565b604080516001600160a01b038416815282151560208201527ff61f4dc0b0143d7980c91f5cc29e03c60e187e943a9013c257d6d925467b29cd91015b60405180910390a15050565b6001600160a01b0381166107a05760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff161561080c5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610797565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b0383166001600160a01b0319909116811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b6108836122af565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610870565b6108d96122af565b816109265760405162461bcd60e51b815260206004820152601e60248201527f5f6c7073206164647265737365732063616e6e6f7420626520656d70747900006044820152606401610797565b60005b828110156109ce57811561097c5761097784848381811061095a57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061096f9190612736565b601790612323565b6109bc565b6109bc84848381811061099f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109b49190612736565b601790612376565b806109c681612a78565b915050610929565b50505050565b6109dc6122af565b6014805460ff19168215159081179091556040519081527fb5904db2085e99a94e249622cedaf8872abd2478f6d0b3d08a00be6353c193db90602001610870565b600154600160b81b900460ff16610a4157600154600160b01b900460ff1615610a45565b303b155b610aa85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610797565b600154600160b81b900460ff16158015610ad2576001805461ffff60b01b191661010160b01b1790555b610adb83610745565b610ae3612117565b60038054610100600160a81b0319166101006001600160a01b038516021790558015610b17576001805460ff60b81b191690555b505050565b60035461010090046001600160a01b03163314610b7b5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920616c6c6f7765642066726f6d205374616b696e675468616c6573006044820152606401610797565b6001600160a01b03831660009081526011602052604090205460ff1680610bba57506001600160a01b03831660009081526012602052604090205460ff165b80610bdd57506001600160a01b03831660009081526013602052604090205460ff165b610c295760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920616c6c6f77656420666f72206b6e6f776e206f726967696e0000006044820152606401610797565b600354604051631676539160e01b81526001600160a01b0386811660048301526000926101009004169063167653919060240160206040518083038186803b158015610c7457600080fd5b505afa158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac91906128e3565b11156109ce576001600160a01b03831660009081526011602052604081205460ff1615610d38576001600160a01b038516600090815260096020908152604080832085845290915281208054859290610d06908490612a0a565b90915550506000828152600d602052604081208054859290610d29908490612a0a565b90915550506006549050610e40565b6001600160a01b03841660009081526012602052604090205460ff1615610dbe576001600160a01b0385166000908152600a6020908152604080832085845290915281208054859290610d8c908490612a0a565b90915550506000828152600e602052604081208054859290610daf908490612a0a565b90915550506007549050610e40565b6001600160a01b03841660009081526013602052604090205460ff1615610e40576001600160a01b0385166000908152600b6020908152604080832085845290915281208054859290610e12908490612a0a565b90915550506000828152600f602052604081208054859290610e35908490612a0a565b909155505060085490505b6000670de0b6b3a764000080610e568487612a42565b610e609190612a22565b610e6988610f49565b610e7b90670de0b6b3a7640000612a0a565b610e859190612a42565b610e8f9190612a22565b6001600160a01b0387166000908152600c60209081526040808320878452909152812080549293508392909190610ec7908490612a0a565b909155505060008381526010602052604081208054839290610eea908490612a0a565b9091555050604080516001600160a01b03808916825287166020820152908101859052606081018490527fbc306e8f021c8366985c3510cd2fb28e33a609e19ad7952476c1cef7c498435f9060800160405180910390a1505050505050565b60048054600354604051631676539160e01b81526001600160a01b03858116948201949094526000938493926101009004169063167653919060240160206040518083038186803b158015610f9d57600080fd5b505afa158015610fb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd591906128e3565b610fdf9190612a22565b90506005548110610ff257600554610ff4565b805b9392505050565b6110036122af565b60068390556007829055600881905560408051848152602081018490529081018290527fa24fc07a330b1a168e2e91b3315e5bf80d57bbdbbe5c8ccf67ebe6e404a361169060600160405180910390a1505050565b6001546001600160a01b031633146110d05760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610797565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b61114a6122af565b60058190556040518181527f144186f10b69364cbc1c93caecab272533eb39e92d736ca394058be92190348690602001610870565b6111876122af565b60038054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f475a2179b9b6a155e7ba3f46a461beb6798279b265026364944e38dcb4bacafe90602001610870565b60008181526010602052604081205415611240576000828152601060209081526040808320546001600160a01b0387168452600c83528184208685529092529091205461123390670de0b6b3a764000090612a42565b61123d9190612a22565b90505b92915050565b61124e6122af565b6001600160a01b0382166000908152601160205260409020805460ff1916821580159190911790915561128b57611286601583612323565b611296565b611296601583612376565b604080516001600160a01b038416815282151560208201527fce95da1d127ecdb574185e774690564ccb54969a41176c64e06d3ee36cd1475c9101610739565b6112de6122af565b6001600160a01b038216600081815260136020908152604091829020805460ff19168515159081179091558251938452908301527f11302a18034d796374a377e68c144b8829da9103828761a8ba132616d581ccc89101610739565b606060008367ffffffffffffffff81111561136557634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113c157816020015b6113ae6040518060800160405280600081526020016000815260200160008152602001600081525090565b8152602001906001900390816113835790505b50905060005b848110156115af576114078686838181106113f257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104069190612736565b82828151811061142757634e487b7160e01b600052603260045260246000fd5b60209081029190910101515261146b86868381811061145657634e487b7160e01b600052603260045260246000fd5b905060200201602081019061056c9190612736565b82828151811061148b57634e487b7160e01b600052603260045260246000fd5b602002602001015160200181815250506114d38686838181106114be57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105889190612736565b8282815181106114f357634e487b7160e01b600052603260045260246000fd5b60200260200101516040018181525050600b600087878481811061152757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061153c9190612736565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008581526020019081526020016000205482828151811061158e57634e487b7160e01b600052603260045260246000fd5b602090810291909101015160600152806115a781612a78565b9150506113c7565b50949350505050565b6015805460009182906115cc9082846124f9565b905060005b81518110156118035760008282815181106115fc57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031663146ca5316040518163ffffffff1660e01b815260040160206040518083038186803b15801561163c57600080fd5b505afa158015611650573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167491906128e3565b90506000670de0b6b3a76400006006548585815181106116a457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316635ddd3e83858b6040518363ffffffff1660e01b81526004016116eb9291909182526001600160a01b0316602082015260400190565b60206040518083038186803b15801561170357600080fd5b505afa158015611717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173b91906128e3565b6117459190612a42565b61174f9190612a22565b6019549091506001600160a01b0316156117e257601954604051630bfec24d60e11b8152600481018390526001600160a01b03909116906317fd849a9060240160206040518083038186803b1580156117a757600080fd5b505afa1580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df91906128e3565b90505b6117ec8187612a0a565b9550505080806117fb90612a78565b9150506115d1565b505050919050565b60178054600091829061181f9082846124f9565b905060005b815181101561180357600082828151811061184f57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031663146ca5316040518163ffffffff1660e01b815260040160206040518083038186803b15801561188f57600080fd5b505afa1580156118a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c791906128e3565b90506000670de0b6b3a76400006007548585815181106118f757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316635ddd3e83858b6040518363ffffffff1660e01b815260040161193e9291909182526001600160a01b0316602082015260400190565b60206040518083038186803b15801561195657600080fd5b505afa15801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e91906128e3565b6119989190612a42565b6119a29190612a22565b6019549091506001600160a01b031615611a3557601954604051630bfec24d60e11b8152600481018390526001600160a01b03909116906317fd849a9060240160206040518083038186803b1580156119fa57600080fd5b505afa158015611a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3291906128e3565b90505b611a3f8187612a0a565b955050508080611a4e90612a78565b915050611824565b611a5e6122af565b6001600160a01b038116611aa65760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610797565b600154600160a81b900460ff1615611af65760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610797565b600080546001600160a01b0383166001600160a01b031990911681179091556001805460ff60a81b1916600160a81b1790556040805182815260208101929092527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610870565b611b676122af565b601980546001600160a01b0319166001600160a01b0383169081179091556040519081527f198db6e425fb8aafd1823c6ca50be2d51e5764571a5ae0f0f21c6812e45def0b90602001610870565b606060008367ffffffffffffffff811115611be057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c5957816020015b611c4660405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b815260200190600190039081611bfe5790505b50905060005b848110156115af57611ca5868683818110611c8a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611c9f9190612736565b856111dd565b828281518110611cc557634e487b7160e01b600052603260045260246000fd5b602090810291909101015152611cf48686838181106113f257634e487b7160e01b600052603260045260246000fd5b828281518110611d1457634e487b7160e01b600052603260045260246000fd5b6020026020010151602001818152505060096000878784818110611d4857634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611d5d9190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600085815260200190815260200160002054828281518110611daf57634e487b7160e01b600052603260045260246000fd5b60200260200101516040018181525050600a6000878784818110611de357634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611df89190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600085815260200190815260200160002054828281518110611e4a57634e487b7160e01b600052603260045260246000fd5b60200260200101516080018181525050670de0b6b3a764000060065460096000898986818110611e8a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611e9f9190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087815260200190815260200160002054611edb9190612a42565b611ee59190612a22565b828281518110611f0557634e487b7160e01b600052603260045260246000fd5b60200260200101516060018181525050670de0b6b3a7640000600754600a6000898986818110611f4557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611f5a9190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087815260200190815260200160002054611f969190612a42565b611fa09190612a22565b828281518110611fc057634e487b7160e01b600052603260045260246000fd5b602002602001015160a0018181525050600b6000878784818110611ff457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906120099190612736565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008581526020019081526020016000205482828151811061205b57634e487b7160e01b600052603260045260246000fd5b602002602001015160c0018181525050600c600087878481811061208f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906120a49190612736565b6001600160a01b03166001600160a01b031681526020019081526020016000206000858152602001908152602001600020548282815181106120f657634e487b7160e01b600052603260045260246000fd5b602090810291909101015160e001528061210f81612a78565b915050611c5f565b60035460ff16156121605760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610797565b6003805460ff19166001908117909155600255565b61217d6122af565b816121ca5760405162461bcd60e51b815260206004820181905260248201527f7661756c7473206164647265737365732063616e6e6f7420626520656d7074796044820152606401610797565b60005b828110156109ce5781156122205761221b8484838181106121fe57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122139190612736565b601590612323565b612260565b61226084848381811061224357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122589190612736565b601590612376565b8061226a81612a78565b9150506121cd565b61227a6122af565b60048190556040518181527fdd21dd8129ace7b6137065b4198f897f5b2b9369ed9b1bc52ba43ec9e5db88a490602001610870565b6000546001600160a01b031633146123215760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610797565b565b61232d828261263e565b6123725781546001600160a01b038216600081815260018086016020908152604083208590559084018655858252902090910180546001600160a01b03191690911790555b5050565b612380828261263e565b6123c25760405162461bcd60e51b815260206004820152601360248201527222b632b6b2b73a103737ba1034b71039b2ba1760691b6044820152606401610797565b6001600160a01b03811660009081526001808401602052604082205484549092916123ec91612a61565b905080821461249457600084600001828154811061241a57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015485546001600160a01b039091169150819086908590811061245757634e487b7160e01b600052603260045260246000fd5b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815260018601909152604090208290555b83548490806124b357634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0394909416815260019490940190925250506040812055565b606060006125078385612a0a565b8554909150811115612517575083545b838111612534575050604080516000815260208101909152610ff4565b60006125408583612a61565b905060008167ffffffffffffffff81111561256b57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612594578160200160208202803683370190505b50905060005b8281101561263357876125ad8883612a0a565b815481106125cb57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061260957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061262b81612a78565b91505061259a565b509695505050505050565b815460009061264f57506000611240565b6001600160a01b0382166000908152600184016020526040902054801515806126b85750826001600160a01b0316846000016000815481106126a157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316145b949350505050565b80356001600160a01b03811681146126d757600080fd5b919050565b60008083601f8401126126ed578182fd5b50813567ffffffffffffffff811115612704578182fd5b6020830191508360208260051b850101111561271f57600080fd5b9250929050565b803580151581146126d757600080fd5b600060208284031215612747578081fd5b61123d826126c0565b60008060408385031215612762578081fd5b61276b836126c0565b9150612779602084016126c0565b90509250929050565b60008060008060808587031215612797578182fd5b6127a0856126c0565b93506127ae602086016126c0565b93969395505050506040820135916060013590565b600080604083850312156127d5578182fd5b6127de836126c0565b915061277960208401612726565b600080604083850312156127fe578182fd5b612807836126c0565b946020939093013593505050565b600080600060408486031215612829578283fd5b833567ffffffffffffffff81111561283f578384fd5b61284b868287016126dc565b909450925061285e905060208501612726565b90509250925092565b60008060006040848603121561287b578283fd5b833567ffffffffffffffff811115612891578384fd5b61289d868287016126dc565b909790965060209590950135949350505050565b6000602082840312156128c2578081fd5b61123d82612726565b6000602082840312156128dc578081fd5b5035919050565b6000602082840312156128f4578081fd5b5051919050565b60008060006060848603121561290f578283fd5b505081359360208301359350604090920135919050565b602080825282518282018190526000919060409081850190868401855b8281101561297d57815180518552868101518786015285810151868601526060908101519085015260809093019290850190600101612943565b5091979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561297d5781518051855286810151878601528581015186860152606080820151908601526080808201519086015260a0808201519086015260c0808201519086015260e0908101519085015261010090930192908501906001016129a7565b60008219821115612a1d57612a1d612a93565b500190565b600082612a3d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612a5c57612a5c612a93565b500290565b600082821015612a7357612a73612a93565b500390565b6000600019821415612a8c57612a8c612a93565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122041a31e28be16620d41ef5f393f694300c87b5fb2153fbc64c30c8120fddd44e764736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061027f5760003560e01c80637c2537681161015c578063b378143f116100ce578063e238b44c11610087578063e238b44c14610627578063ebc7977214610647578063f5a002331461064f578063faba327814610662578063fd8a8cc614610675578063fe69bd771461068d57600080fd5b8063b378143f1461058d578063c3b83f5f14610596578063c7297a60146105a9578063d0ebdbe7146105d4578063d9516791146105e7578063df022bf51461060757600080fd5b8063900e729011610120578063900e72901461050b5780639205dc8d1461052b57806397005f5e1461053e5780639c917a6b1461055e578063a86086b914610571578063b1404e651461057a57600080fd5b80637c253768146104ac5780637f852582146104bf5780638d61c38b146104d25780638da5cb5b146104e55780638fcfa5fa146104f857600080fd5b8063481c6a75116101f55780635bd90b48116101b95780635bd90b481461040b5780636bb6216e146104185780636ce46bc3146104435780636e53033d146104565780637684368a1461047957806379ba5097146104a457600080fd5b8063481c6a7514610394578063485cc955146103bf57806352a31c07146103d257806353a47bb7146103e557806356a23f33146103f857600080fd5b8063295f8d7911610247578063295f8d79146102ee5780632b3035f6146103015780632bea30021461030a5780632e8e6f2e14610335578063314102b61461036857806340dcc4d11461038b57600080fd5b806304fc1954146102845780630a6bb7f9146102a057806313af4035146102b55780631627540c146102c857806322ccdd88146102db575b600080fd5b61028d60065481565b6040519081526020015b60405180910390f35b6102b36102ae3660046127c3565b6106ad565b005b6102b36102c3366004612736565b610745565b6102b36102d6366004612736565b61087b565b6102b36102e9366004612815565b6108d1565b6102b36102fc3660046128b1565b6109d4565b61028d60085481565b61028d6103183660046127ec565b600c60209081526000928352604080842090915290825290205481565b610358610343366004612736565b60126020526000908152604090205460ff1681565b6040519015158152602001610297565b610358610376366004612736565b60136020526000908152604090205460ff1681565b61028d60055481565b6019546103a7906001600160a01b031681565b6040516001600160a01b039091168152602001610297565b6102b36103cd366004612750565b610a1d565b6102b36103e0366004612782565b610b1c565b6001546103a7906001600160a01b031681565b61028d610406366004612736565b610f49565b6014546103589060ff1681565b61028d6104263660046127ec565b600a60209081526000928352604080842090915290825290205481565b6102b36104513660046128fb565b610ffb565b610358610464366004612736565b60116020526000908152604090205460ff1681565b61028d6104873660046127ec565b600960209081526000928352604080842090915290825290205481565b6102b3611058565b6102b36104ba3660046128cb565b611142565b6102b36104cd366004612736565b61117f565b61028d6104e03660046127ec565b6111dd565b6000546103a7906001600160a01b031681565b6102b36105063660046127c3565b611246565b61028d6105193660046128cb565b600e6020526000908152604090205481565b6102b36105393660046127c3565b6112d6565b61055161054c366004612867565b61133a565b6040516102979190612926565b61028d61056c366004612736565b6115b8565b61028d60075481565b61028d610588366004612736565b61180b565b61028d60045481565b6102b36105a4366004612736565b611a56565b61028d6105b73660046127ec565b600b60209081526000928352604080842090915290825290205481565b6102b36105e2366004612736565b611b5f565b6105fa6105f5366004612867565b611bb5565b604051610297919061298a565b61028d6106153660046128cb565b60106020526000908152604090205481565b61028d6106353660046128cb565b600d6020526000908152604090205481565b6102b3612117565b6102b361065d366004612815565b612175565b6102b36106703660046128cb565b612272565b6003546103a79061010090046001600160a01b031681565b61028d61069b3660046128cb565b600f6020526000908152604090205481565b6106b56122af565b6001600160a01b0382166000908152601260205260409020805460ff191682158015919091179091556106f2576106ed601783612323565b6106fd565b6106fd601783612376565b604080516001600160a01b038416815282151560208201527ff61f4dc0b0143d7980c91f5cc29e03c60e187e943a9013c257d6d925467b29cd91015b60405180910390a15050565b6001600160a01b0381166107a05760405162461bcd60e51b815260206004820152601960248201527f4f776e657220616464726573732063616e6e6f7420626520300000000000000060448201526064015b60405180910390fd5b600154600160a01b900460ff161561080c5760405162461bcd60e51b815260206004820152602960248201527f416c726561647920696e697469616c697a65642c20757365206e6f6d696e617460448201526832a732bba7bbb732b960b91b6064820152608401610797565b6001805460ff60a01b1916600160a01b179055600080546001600160a01b0383166001600160a01b0319909116811782556040805192835260208301919091527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91015b60405180910390a150565b6108836122af565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290602001610870565b6108d96122af565b816109265760405162461bcd60e51b815260206004820152601e60248201527f5f6c7073206164647265737365732063616e6e6f7420626520656d70747900006044820152606401610797565b60005b828110156109ce57811561097c5761097784848381811061095a57634e487b7160e01b600052603260045260246000fd5b905060200201602081019061096f9190612736565b601790612323565b6109bc565b6109bc84848381811061099f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906109b49190612736565b601790612376565b806109c681612a78565b915050610929565b50505050565b6109dc6122af565b6014805460ff19168215159081179091556040519081527fb5904db2085e99a94e249622cedaf8872abd2478f6d0b3d08a00be6353c193db90602001610870565b600154600160b81b900460ff16610a4157600154600160b01b900460ff1615610a45565b303b155b610aa85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401610797565b600154600160b81b900460ff16158015610ad2576001805461ffff60b01b191661010160b01b1790555b610adb83610745565b610ae3612117565b60038054610100600160a81b0319166101006001600160a01b038516021790558015610b17576001805460ff60b81b191690555b505050565b60035461010090046001600160a01b03163314610b7b5760405162461bcd60e51b815260206004820152601f60248201527f4f6e6c7920616c6c6f7765642066726f6d205374616b696e675468616c6573006044820152606401610797565b6001600160a01b03831660009081526011602052604090205460ff1680610bba57506001600160a01b03831660009081526012602052604090205460ff165b80610bdd57506001600160a01b03831660009081526013602052604090205460ff165b610c295760405162461bcd60e51b815260206004820152601d60248201527f4f6e6c7920616c6c6f77656420666f72206b6e6f776e206f726967696e0000006044820152606401610797565b600354604051631676539160e01b81526001600160a01b0386811660048301526000926101009004169063167653919060240160206040518083038186803b158015610c7457600080fd5b505afa158015610c88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cac91906128e3565b11156109ce576001600160a01b03831660009081526011602052604081205460ff1615610d38576001600160a01b038516600090815260096020908152604080832085845290915281208054859290610d06908490612a0a565b90915550506000828152600d602052604081208054859290610d29908490612a0a565b90915550506006549050610e40565b6001600160a01b03841660009081526012602052604090205460ff1615610dbe576001600160a01b0385166000908152600a6020908152604080832085845290915281208054859290610d8c908490612a0a565b90915550506000828152600e602052604081208054859290610daf908490612a0a565b90915550506007549050610e40565b6001600160a01b03841660009081526013602052604090205460ff1615610e40576001600160a01b0385166000908152600b6020908152604080832085845290915281208054859290610e12908490612a0a565b90915550506000828152600f602052604081208054859290610e35908490612a0a565b909155505060085490505b6000670de0b6b3a764000080610e568487612a42565b610e609190612a22565b610e6988610f49565b610e7b90670de0b6b3a7640000612a0a565b610e859190612a42565b610e8f9190612a22565b6001600160a01b0387166000908152600c60209081526040808320878452909152812080549293508392909190610ec7908490612a0a565b909155505060008381526010602052604081208054839290610eea908490612a0a565b9091555050604080516001600160a01b03808916825287166020820152908101859052606081018490527fbc306e8f021c8366985c3510cd2fb28e33a609e19ad7952476c1cef7c498435f9060800160405180910390a1505050505050565b60048054600354604051631676539160e01b81526001600160a01b03858116948201949094526000938493926101009004169063167653919060240160206040518083038186803b158015610f9d57600080fd5b505afa158015610fb1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd591906128e3565b610fdf9190612a22565b90506005548110610ff257600554610ff4565b805b9392505050565b6110036122af565b60068390556007829055600881905560408051848152602081018490529081018290527fa24fc07a330b1a168e2e91b3315e5bf80d57bbdbbe5c8ccf67ebe6e404a361169060600160405180910390a1505050565b6001546001600160a01b031633146110d05760405162461bcd60e51b815260206004820152603560248201527f596f75206d757374206265206e6f6d696e61746564206265666f726520796f7560448201527402063616e20616363657074206f776e65727368697605c1b6064820152608401610797565b600054600154604080516001600160a01b0393841681529290911660208301527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c910160405180910390a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b61114a6122af565b60058190556040518181527f144186f10b69364cbc1c93caecab272533eb39e92d736ca394058be92190348690602001610870565b6111876122af565b60038054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f475a2179b9b6a155e7ba3f46a461beb6798279b265026364944e38dcb4bacafe90602001610870565b60008181526010602052604081205415611240576000828152601060209081526040808320546001600160a01b0387168452600c83528184208685529092529091205461123390670de0b6b3a764000090612a42565b61123d9190612a22565b90505b92915050565b61124e6122af565b6001600160a01b0382166000908152601160205260409020805460ff1916821580159190911790915561128b57611286601583612323565b611296565b611296601583612376565b604080516001600160a01b038416815282151560208201527fce95da1d127ecdb574185e774690564ccb54969a41176c64e06d3ee36cd1475c9101610739565b6112de6122af565b6001600160a01b038216600081815260136020908152604091829020805460ff19168515159081179091558251938452908301527f11302a18034d796374a377e68c144b8829da9103828761a8ba132616d581ccc89101610739565b606060008367ffffffffffffffff81111561136557634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156113c157816020015b6113ae6040518060800160405280600081526020016000815260200160008152602001600081525090565b8152602001906001900390816113835790505b50905060005b848110156115af576114078686838181106113f257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906104069190612736565b82828151811061142757634e487b7160e01b600052603260045260246000fd5b60209081029190910101515261146b86868381811061145657634e487b7160e01b600052603260045260246000fd5b905060200201602081019061056c9190612736565b82828151811061148b57634e487b7160e01b600052603260045260246000fd5b602002602001015160200181815250506114d38686838181106114be57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906105889190612736565b8282815181106114f357634e487b7160e01b600052603260045260246000fd5b60200260200101516040018181525050600b600087878481811061152757634e487b7160e01b600052603260045260246000fd5b905060200201602081019061153c9190612736565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008581526020019081526020016000205482828151811061158e57634e487b7160e01b600052603260045260246000fd5b602090810291909101015160600152806115a781612a78565b9150506113c7565b50949350505050565b6015805460009182906115cc9082846124f9565b905060005b81518110156118035760008282815181106115fc57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031663146ca5316040518163ffffffff1660e01b815260040160206040518083038186803b15801561163c57600080fd5b505afa158015611650573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167491906128e3565b90506000670de0b6b3a76400006006548585815181106116a457634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316635ddd3e83858b6040518363ffffffff1660e01b81526004016116eb9291909182526001600160a01b0316602082015260400190565b60206040518083038186803b15801561170357600080fd5b505afa158015611717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061173b91906128e3565b6117459190612a42565b61174f9190612a22565b6019549091506001600160a01b0316156117e257601954604051630bfec24d60e11b8152600481018390526001600160a01b03909116906317fd849a9060240160206040518083038186803b1580156117a757600080fd5b505afa1580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df91906128e3565b90505b6117ec8187612a0a565b9550505080806117fb90612a78565b9150506115d1565b505050919050565b60178054600091829061181f9082846124f9565b905060005b815181101561180357600082828151811061184f57634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b031663146ca5316040518163ffffffff1660e01b815260040160206040518083038186803b15801561188f57600080fd5b505afa1580156118a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c791906128e3565b90506000670de0b6b3a76400006007548585815181106118f757634e487b7160e01b600052603260045260246000fd5b60200260200101516001600160a01b0316635ddd3e83858b6040518363ffffffff1660e01b815260040161193e9291909182526001600160a01b0316602082015260400190565b60206040518083038186803b15801561195657600080fd5b505afa15801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e91906128e3565b6119989190612a42565b6119a29190612a22565b6019549091506001600160a01b031615611a3557601954604051630bfec24d60e11b8152600481018390526001600160a01b03909116906317fd849a9060240160206040518083038186803b1580156119fa57600080fd5b505afa158015611a0e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3291906128e3565b90505b611a3f8187612a0a565b955050508080611a4e90612a78565b915050611824565b611a5e6122af565b6001600160a01b038116611aa65760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b6044820152606401610797565b600154600160a81b900460ff1615611af65760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481d1c985b9cd9995c9c9959606a1b6044820152606401610797565b600080546001600160a01b0383166001600160a01b031990911681179091556001805460ff60a81b1916600160a81b1790556040805182815260208101929092527fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9101610870565b611b676122af565b601980546001600160a01b0319166001600160a01b0383169081179091556040519081527f198db6e425fb8aafd1823c6ca50be2d51e5764571a5ae0f0f21c6812e45def0b90602001610870565b606060008367ffffffffffffffff811115611be057634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611c5957816020015b611c4660405180610100016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b815260200190600190039081611bfe5790505b50905060005b848110156115af57611ca5868683818110611c8a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611c9f9190612736565b856111dd565b828281518110611cc557634e487b7160e01b600052603260045260246000fd5b602090810291909101015152611cf48686838181106113f257634e487b7160e01b600052603260045260246000fd5b828281518110611d1457634e487b7160e01b600052603260045260246000fd5b6020026020010151602001818152505060096000878784818110611d4857634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611d5d9190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600085815260200190815260200160002054828281518110611daf57634e487b7160e01b600052603260045260246000fd5b60200260200101516040018181525050600a6000878784818110611de357634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611df89190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600085815260200190815260200160002054828281518110611e4a57634e487b7160e01b600052603260045260246000fd5b60200260200101516080018181525050670de0b6b3a764000060065460096000898986818110611e8a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611e9f9190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087815260200190815260200160002054611edb9190612a42565b611ee59190612a22565b828281518110611f0557634e487b7160e01b600052603260045260246000fd5b60200260200101516060018181525050670de0b6b3a7640000600754600a6000898986818110611f4557634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611f5a9190612736565b6001600160a01b03166001600160a01b03168152602001908152602001600020600087815260200190815260200160002054611f969190612a42565b611fa09190612a22565b828281518110611fc057634e487b7160e01b600052603260045260246000fd5b602002602001015160a0018181525050600b6000878784818110611ff457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906120099190612736565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008581526020019081526020016000205482828151811061205b57634e487b7160e01b600052603260045260246000fd5b602002602001015160c0018181525050600c600087878481811061208f57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906120a49190612736565b6001600160a01b03166001600160a01b031681526020019081526020016000206000858152602001908152602001600020548282815181106120f657634e487b7160e01b600052603260045260246000fd5b602090810291909101015160e001528061210f81612a78565b915050611c5f565b60035460ff16156121605760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610797565b6003805460ff19166001908117909155600255565b61217d6122af565b816121ca5760405162461bcd60e51b815260206004820181905260248201527f7661756c7473206164647265737365732063616e6e6f7420626520656d7074796044820152606401610797565b60005b828110156109ce5781156122205761221b8484838181106121fe57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122139190612736565b601590612323565b612260565b61226084848381811061224357634e487b7160e01b600052603260045260246000fd5b90506020020160208101906122589190612736565b601590612376565b8061226a81612a78565b9150506121cd565b61227a6122af565b60048190556040518181527fdd21dd8129ace7b6137065b4198f897f5b2b9369ed9b1bc52ba43ec9e5db88a490602001610870565b6000546001600160a01b031633146123215760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c792074686520636f6e7472616374206f776e6572206d6179207065726660448201526e37b936903a3434b99030b1ba34b7b760891b6064820152608401610797565b565b61232d828261263e565b6123725781546001600160a01b038216600081815260018086016020908152604083208590559084018655858252902090910180546001600160a01b03191690911790555b5050565b612380828261263e565b6123c25760405162461bcd60e51b815260206004820152601360248201527222b632b6b2b73a103737ba1034b71039b2ba1760691b6044820152606401610797565b6001600160a01b03811660009081526001808401602052604082205484549092916123ec91612a61565b905080821461249457600084600001828154811061241a57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015485546001600160a01b039091169150819086908590811061245757634e487b7160e01b600052603260045260246000fd5b600091825260208083209190910180546001600160a01b0319166001600160a01b0394851617905592909116815260018601909152604090208290555b83548490806124b357634e487b7160e01b600052603160045260246000fd5b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b0394909416815260019490940190925250506040812055565b606060006125078385612a0a565b8554909150811115612517575083545b838111612534575050604080516000815260208101909152610ff4565b60006125408583612a61565b905060008167ffffffffffffffff81111561256b57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015612594578160200160208202803683370190505b50905060005b8281101561263357876125ad8883612a0a565b815481106125cb57634e487b7160e01b600052603260045260246000fd5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061260957634e487b7160e01b600052603260045260246000fd5b6001600160a01b03909216602092830291909101909101528061262b81612a78565b91505061259a565b509695505050505050565b815460009061264f57506000611240565b6001600160a01b0382166000908152600184016020526040902054801515806126b85750826001600160a01b0316846000016000815481106126a157634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b0316145b949350505050565b80356001600160a01b03811681146126d757600080fd5b919050565b60008083601f8401126126ed578182fd5b50813567ffffffffffffffff811115612704578182fd5b6020830191508360208260051b850101111561271f57600080fd5b9250929050565b803580151581146126d757600080fd5b600060208284031215612747578081fd5b61123d826126c0565b60008060408385031215612762578081fd5b61276b836126c0565b9150612779602084016126c0565b90509250929050565b60008060008060808587031215612797578182fd5b6127a0856126c0565b93506127ae602086016126c0565b93969395505050506040820135916060013590565b600080604083850312156127d5578182fd5b6127de836126c0565b915061277960208401612726565b600080604083850312156127fe578182fd5b612807836126c0565b946020939093013593505050565b600080600060408486031215612829578283fd5b833567ffffffffffffffff81111561283f578384fd5b61284b868287016126dc565b909450925061285e905060208501612726565b90509250925092565b60008060006040848603121561287b578283fd5b833567ffffffffffffffff811115612891578384fd5b61289d868287016126dc565b909790965060209590950135949350505050565b6000602082840312156128c2578081fd5b61123d82612726565b6000602082840312156128dc578081fd5b5035919050565b6000602082840312156128f4578081fd5b5051919050565b60008060006060848603121561290f578283fd5b505081359360208301359350604090920135919050565b602080825282518282018190526000919060409081850190868401855b8281101561297d57815180518552868101518786015285810151868601526060908101519085015260809093019290850190600101612943565b5091979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561297d5781518051855286810151878601528581015186860152606080820151908601526080808201519086015260a0808201519086015260c0808201519086015260e0908101519085015261010090930192908501906001016129a7565b60008219821115612a1d57612a1d612a93565b500190565b600082612a3d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612a5c57612a5c612a93565b500290565b600082821015612a7357612a73612a93565b500390565b6000600019821415612a8c57612a8c612a93565b5060010190565b634e487b7160e01b600052601160045260246000fdfea264697066735822122041a31e28be16620d41ef5f393f694300c87b5fb2153fbc64c30c8120fddd44e764736f6c63430008040033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.