S Price: $0.704934 (+4.75%)

Contract

0xb1836DA24869eD8728E3e9fd34bF862d768B974F

Overview

S Balance

Sonic LogoSonic LogoSonic Logo0 S

S Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ClaimFeesMulticall

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 9 : ClaimFeesMulticall.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.13;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";

interface IGaugeFactory {
    function gauges() external view returns (address[] memory);
}

interface IGauge {
    function claimFees() external returns (uint claimed0, uint claimed1);
    function TOKEN() external view returns (address);
}

interface IPair {
    function claimStakingFees() external;
}

interface IVoter {
    function isAlive(address gauge) external returns (bool);
    function isGauge(address gauge) external returns (bool);
    function _epochTimestamp() external view returns (uint256);
}

interface ISplitter {
    function split() external;
    function stakingConverter() external view returns (address);
    function balanceOf() external view returns (uint256);
}

interface ISWPxNFTFeeConverter {
    function claimFees() external;
    function swap() external;
    function swap(uint256 from, uint256 to) external;
}

interface ICommunityVault {
    struct WithdrawTokensParams {
        address token;
        uint256 amount;
    }

    function withdrawTokens(WithdrawTokensParams[] calldata params) external;
}

interface IAlgebraPool {
    function token0() external view returns (address);
    function token1() external view returns (address);
    function communityVault() external view returns (address);
}

contract ClaimFeesMulticall is AccessControl {
    /// @notice backend role's value
    bytes32 public constant BACKEND_ROLE = keccak256("BACKEND_ROLE");

    /// @notice voter contract address
    address public voter;

    /// @notice gauge factory for GaugeV2 contracts
    address public gaugeFactory;

    /// @notice gauge factory for GaugeV2_CL contracts
    address public gaugeFactoryCL;

    /// @notice NFTSalesSplitter contract
    address public splitter;

    /// @notice SWPxNFTFeeConverter contract
    address public feeConverter;

    /// @notice true - claimFees called at this epoch, else - false
    mapping(uint256 => bool) public epochClaimed;

    /// @notice true - claimStakingFees called at this epoch, else - false
    mapping(uint256 => bool) public epochClaimedStaking;

    event CommunityFeesClaimed(
        address algebraPool,
        address communityVault,
        address token0,
        address token1,
        uint256 amount0,
        uint256 amount1
    );
    event ClaimCommunityFeesFailed(
        address algebraPool,
        address communityVault,
        address token0,
        address token1,
        uint256 amount0,
        uint256 amount1
    );

    constructor(
        address _voter,
        address _gaugeFactory,
        address _gaugeFactoryCL,
        address _splitter
    ) {
        _setVoter(_voter);
        _setGaugeFactory(_gaugeFactory);
        _setGaugeFactoryCL(_gaugeFactoryCL);
        _setSplitter(_splitter);

        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
    }

    // ownable methods

    /** @notice change VoterV3 contract address
     * @param _voter new contract address
     * @dev owner only
     */
    function setVoter(address _voter) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setVoter(_voter);
    }

    /** @notice change GaugeFactory contract address
     * @param _gaugeFactory new contract address
     * @dev owner only
     */
    function setGaugeFactory(
        address _gaugeFactory
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setGaugeFactory(_gaugeFactory);
    }

    /** @notice change GaugeFactoryCL contract address
     * @param _gaugeFactoryCL new contract address
     * @dev owner only
     */
    function setGaugeFactoryCL(
        address _gaugeFactoryCL
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setGaugeFactoryCL(_gaugeFactoryCL);
    }

    function setSplitter(
        address _splitter
    ) external onlyRole(DEFAULT_ADMIN_ROLE) {
        _setSplitter(_splitter);
    }

    // view methods

    /** @notice get list of gauges (v2/CL)
     * @return gauges list for v2 pools
     * @return gaugesCL list for CL pools
     * @return totalGauges summury length of pools array
     */
    function getGauges()
        public
        view
        returns (
            address[] memory gauges,
            address[] memory gaugesCL,
            uint256 totalGauges
        )
    {
        gauges = IGaugeFactory(gaugeFactory).gauges();
        gaugesCL = IGaugeFactory(gaugeFactoryCL).gauges();
        totalGauges = gauges.length + gaugesCL.length;
    }

    /** @notice true - claimFees called at this epoch, else - false
     */
    function claimed() external view returns (bool) {
        return epochClaimed[IVoter(voter)._epochTimestamp()];
    }

    /** @notice true - claimStakingFees called at this epoch, else - false
     */
    function claimedStaking() external view returns (bool) {
        return epochClaimedStaking[IVoter(voter)._epochTimestamp()];
    }

    // public

    /// @notice call claimFees at all gauges
    function claimFees() external {
        (address[] memory gauges, address[] memory gaugesCL, ) = getGauges();

        uint256 len1 = gauges.length;
        uint256 len2 = gaugesCL.length;
        uint256 mainLen = len1 > len2 ? len1 : len2;

        for (uint256 i; i < mainLen; i++) {
            if (i < len1) _claimFees(gauges[i]);

            if (i < len2) _claimFees(gaugesCL[i]);
        }

        epochClaimed[IVoter(voter)._epochTimestamp()] = true;
    }

    /// @notice call claimFees at current gauges (from start to end index of array)
    function claimFees(uint256 start, uint256 end) external {
        require(start < end, "wrong order");

        (
            address[] memory gauges,
            address[] memory gaugesCL,
            uint totalGauges
        ) = getGauges();

        end = end > totalGauges ? totalGauges : end;
        uint256 len = gauges.length;
        for (uint256 i = start; i < end; i++) {
            if (i < len) _claimFees(gauges[i]);
            else _claimFees(gaugesCL[i - len]);
        }
    }

    /// @notice call claimStakingFees at all v2 pairs
    function claimStakingFees() external {
        (address[] memory gauges, , ) = getGauges();

        uint256 len1 = gauges.length;
        for (uint256 i; i < len1; i++) {
            _claimStakingFees(gauges[i]);
        }

        epochClaimedStaking[IVoter(voter)._epochTimestamp()] = true;
    }

    /// @notice call claimStakingFees at current v2 pairs (from start to end index of array)
    function claimStakingFees(uint256 start, uint256 end) external {
        require(start < end, "wrong order");

        (address[] memory gauges, , ) = getGauges();

        uint256 len1 = gauges.length;
        end = end > len1 ? len1 : end;
        for (uint256 i = start; i < end; i++) {
            _claimStakingFees(gauges[i]);
        }
    }

    /// @notice call splitter if possible, else - call fee converter
    function split() external onlyRole(BACKEND_ROLE) {
        uint256 splitterBalance = ISplitter(splitter).balanceOf() +
            address(splitter).balance;

        if (splitterBalance > 1000) {
            ISplitter(splitter).split();
        } else {
            ISWPxNFTFeeConverter(feeConverter).claimFees();
            ISWPxNFTFeeConverter(feeConverter).swap();
        }
    }

    /// @notice call batch-swaps on the fee converter contract
    function swap(uint256 from, uint256 to) external onlyRole(BACKEND_ROLE) {
        ISWPxNFTFeeConverter(feeConverter).swap(from, to);
    }

    /// @notice claim algebra community fees
    function claimCommunityFees(
        address[] calldata pools
    ) external onlyRole(BACKEND_ROLE) {
        address communityVault;
        address token0;
        address token1;
        uint256 balance0;
        uint256 balance1;
        ICommunityVault.WithdrawTokensParams[]
            memory array = new ICommunityVault.WithdrawTokensParams[](2);
        for (uint256 i; i < pools.length; i++) {
            communityVault = IAlgebraPool(pools[i]).communityVault();

            token0 = IAlgebraPool(pools[i]).token0();
            token1 = IAlgebraPool(pools[i]).token1();
            balance0 = IERC20(token0).balanceOf(communityVault);
            balance1 = IERC20(token1).balanceOf(communityVault);
            array[0] = ICommunityVault.WithdrawTokensParams(token0, balance0);
            array[1] = ICommunityVault.WithdrawTokensParams(token1, balance1);
            try ICommunityVault(communityVault).withdrawTokens(array) {
                emit CommunityFeesClaimed(
                    pools[i],
                    communityVault,
                    token0,
                    token1,
                    balance0,
                    balance1
                );
            } catch {
                emit ClaimCommunityFeesFailed(
                    pools[i],
                    communityVault,
                    token0,
                    token1,
                    balance0,
                    balance1
                );
            }
        }
    }

    // internal methods

    function _setVoter(address _voter) internal {
        require(_voter != address(0));

        voter = _voter;
    }

    function _setGaugeFactory(address _gaugeFactory) internal {
        require(_gaugeFactory != address(0));

        gaugeFactory = _gaugeFactory;
    }

    function _setGaugeFactoryCL(address _gaugeFactoryCL) internal {
        require(_gaugeFactoryCL != address(0));

        gaugeFactoryCL = _gaugeFactoryCL;
    }

    function _setSplitter(address _splitter) internal {
        require(_splitter != address(0));

        feeConverter = ISplitter(_splitter).stakingConverter();
        require(feeConverter != address(0));

        splitter = _splitter;
    }

    function _claimFees(address gauge) internal {
        if (IVoter(voter).isAlive(gauge) && IVoter(voter).isGauge(gauge))
            IGauge(gauge).claimFees();
    }

    function _claimStakingFees(address gauge) internal {
        if (IVoter(voter).isAlive(gauge) && IVoter(voter).isGauge(gauge))
            IPair(IGauge(gauge).TOKEN()).claimStakingFees();
    }
}

File 2 of 9 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 9 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 6 of 9 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 7 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 8 of 9 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 9 of 9 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_voter","type":"address"},{"internalType":"address","name":"_gaugeFactory","type":"address"},{"internalType":"address","name":"_gaugeFactoryCL","type":"address"},{"internalType":"address","name":"_splitter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"algebraPool","type":"address"},{"indexed":false,"internalType":"address","name":"communityVault","type":"address"},{"indexed":false,"internalType":"address","name":"token0","type":"address"},{"indexed":false,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"ClaimCommunityFeesFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"algebraPool","type":"address"},{"indexed":false,"internalType":"address","name":"communityVault","type":"address"},{"indexed":false,"internalType":"address","name":"token0","type":"address"},{"indexed":false,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"CommunityFeesClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"BACKEND_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"pools","type":"address[]"}],"name":"claimCommunityFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"claimFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"claimStakingFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimStakingFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimedStaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"epochClaimedStaking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeConverter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugeFactory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gaugeFactoryCL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGauges","outputs":[{"internalType":"address[]","name":"gauges","type":"address[]"},{"internalType":"address[]","name":"gaugesCL","type":"address[]"},{"internalType":"uint256","name":"totalGauges","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gaugeFactory","type":"address"}],"name":"setGaugeFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_gaugeFactoryCL","type":"address"}],"name":"setGaugeFactoryCL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_splitter","type":"address"}],"name":"setSplitter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_voter","type":"address"}],"name":"setVoter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"split","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"splitter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"from","type":"uint256"},{"internalType":"uint256","name":"to","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"voter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162002226380380620022268339810160408190526200003491620002aa565b6200003f8462000077565b6200004a83620000ad565b6200005582620000e3565b620000608162000119565b6200006d600033620001dd565b505050506200032c565b6001600160a01b0381166200008b57600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116620000c157600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038116620000f757600080fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166200012d57600080fd5b806001600160a01b031663ce08baa76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200016c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000192919062000307565b600580546001600160a01b0319166001600160a01b03929092169182179055620001bb57600080fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b620001e98282620001ed565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001e9576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002493390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b0381168114620002a557600080fd5b919050565b60008060008060808587031215620002c157600080fd5b620002cc856200028d565b9350620002dc602086016200028d565b9250620002ec604086016200028d565b9150620002fc606086016200028d565b905092959194509250565b6000602082840312156200031a57600080fd5b62000325826200028d565b9392505050565b611eea806200033c6000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c806392c2becc11610104578063d547741f116100a2578063f083be3b11610071578063f083be3b146103e6578063f4f7e6a6146103ee578063f675514b14610401578063f76541761461042457600080fd5b8063d547741f14610395578063d96073cf146103a8578063e22f3c2a146103bb578063e834a834146103de57600080fd5b8063a217fddf116100de578063a217fddf1461035f578063c93fc83d14610367578063cdd1c61e1461037a578063d294f0931461038d57600080fd5b806392c2becc146103245780639e9b88e714610339578063a14124c21461034c57600080fd5b80632f2ff15d1161017157806346c96aac1161014b57806346c96aac146102d45780634bc2a657146102e75780635574f46d146102fa57806391d148541461031157600080fd5b80632f2ff15d1461029b57806336568abe146102ae5780633cd8045e146102c157600080fd5b80630d52333c116101ad5780630d52333c1461023c5780630f7f7a201461024f57806323130d1114610257578063248a9ca31461026a57600080fd5b806301ffc9a7146101d4578063026b35d8146101fc5780630d107c4f14610211575b600080fd5b6101e76101e2366004611963565b61042c565b60405190151581526020015b60405180910390f35b61020f61020a36600461198d565b610463565b005b600354610224906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b600254610224906001600160a01b031681565b6101e761050c565b61020f6102653660046119c4565b6105a2565b61028d6102783660046119e1565b60009081526020819052604090206001015490565b6040519081526020016101f3565b61020f6102a93660046119fa565b6105ba565b61020f6102bc3660046119fa565b6105e4565b600454610224906001600160a01b031681565b600154610224906001600160a01b031681565b61020f6102f53660046119c4565b61065e565b610302610672565b6040516101f393929190611a6e565b6101e761031f3660046119fa565b610786565b61028d600080516020611e9583398151915281565b61020f6103473660046119c4565b6107af565b600554610224906001600160a01b031681565b61028d600081565b61020f6103753660046119c4565b6107c3565b61020f61038836600461198d565b6107d7565b61020f6108ad565b61020f6103a33660046119fa565b6109d2565b61020f6103b636600461198d565b6109f7565b6101e76103c93660046119e1565b60066020526000908152604090205460ff1681565b6101e7610a70565b61020f610ac9565b61020f6103fc366004611aa4565b610bad565b6101e761040f3660046119e1565b60076020526000908152604090205460ff1681565b61020f611060565b60006001600160e01b03198216637965db0b60e01b148061045d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b8082106104a55760405162461bcd60e51b815260206004820152600b60248201526a3bb937b7339037b93232b960a91b60448201526064015b60405180910390fd5b60006104af610672565b505080519091508083116104c357826104c5565b805b9250835b83811015610505576104f38382815181106104e6576104e6611b19565b6020026020010151611216565b806104fd81611b45565b9150506104c9565b5050505050565b600060076000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105899190611b5e565b815260208101919091526040016000205460ff16919050565b60006105ad816113b5565b6105b6826113bf565b5050565b6000828152602081905260409020600101546105d5816113b5565b6105df83836113f4565b505050565b6001600160a01b03811633146106545760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161049c565b6105b68282611478565b6000610669816113b5565b6105b6826114dd565b6060806000600260009054906101000a90046001600160a01b03166001600160a01b031663821bdcf16040518163ffffffff1660e01b8152600401600060405180830381865afa1580156106ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106f29190810190611b9d565b9250600360009054906101000a90046001600160a01b03166001600160a01b031663821bdcf16040518163ffffffff1660e01b8152600401600060405180830381865afa158015610747573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261076f9190810190611b9d565b91508151835161077f9190611c62565b9050909192565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60006107ba816113b5565b6105b682611512565b60006107ce816113b5565b6105b682611547565b8082106108145760405162461bcd60e51b815260206004820152600b60248201526a3bb937b7339037b93232b960a91b604482015260640161049c565b6000806000610821610672565b9250925092508084116108345783610836565b805b8351909450855b858110156108a457818110156108745761086f85828151811061086257610862611b19565b6020026020010151611606565b610892565b610892846108828484611c7a565b8151811061086257610862611b19565b8061089c81611b45565b91505061083d565b50505050505050565b6000806108b8610672565b50815181519294509092509060008183116108d357816108d5565b825b905060005b8181101561092e57838110156108ff576108ff86828151811061086257610862611b19565b8281101561091c5761091c85828151811061086257610862611b19565b8061092681611b45565b9150506108da565b50600160066000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ac9190611b5e565b81526020810191909152604001600020805460ff19169115159190911790555050505050565b6000828152602081905260409020600101546109ed816113b5565b6105df8383611478565b600080516020611e95833981519152610a0f816113b5565b60055460405163d96073cf60e01b815260048101859052602481018490526001600160a01b039091169063d96073cf90604401600060405180830381600087803b158015610a5c57600080fd5b505af11580156108a4573d6000803e3d6000fd5b600060066000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d6000803e3d6000fd5b6000610ad3610672565b5050805190915060005b81811015610b0c57610afa8382815181106104e6576104e6611b19565b80610b0481611b45565b915050610add565b50600160076000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611b5e565b81526020810191909152604001600020805460ff19169115159190911790555050565b600080516020611e95833981519152610bc5816113b5565b600080808080806002604051908082528060200260200182016040528015610c1357816020015b6040805180820190915260008082526020820152815260200190600190039081610bec5790505b50905060005b8881101561105457898982818110610c3357610c33611b19565b9050602002016020810190610c4891906119c4565b6001600160a01b03166353e978686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca99190611c91565b9650898982818110610cbd57610cbd611b19565b9050602002016020810190610cd291906119c4565b6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d339190611c91565b9550898982818110610d4757610d47611b19565b9050602002016020810190610d5c91906119c4565b6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbd9190611c91565b6040516370a0823160e01b81526001600160a01b038981166004830152919650908716906370a0823190602401602060405180830381865afa158015610e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2b9190611b5e565b6040516370a0823160e01b81526001600160a01b038981166004830152919550908616906370a0823190602401602060405180830381865afa158015610e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e999190611b5e565b92506040518060400160405280876001600160a01b031681526020018581525082600081518110610ecc57610ecc611b19565b60200260200101819052506040518060400160405280866001600160a01b031681526020018481525082600181518110610f0857610f08611b19565b60209081029190910101526040516337eb71e560e21b81526001600160a01b0388169063dfadc79490610f3f908590600401611cae565b600060405180830381600087803b158015610f5957600080fd5b505af1925050508015610f6a575060015b610fda577f4d7afda1a3fa106fa973fb1f1d1800f4384af4398faf7e2f16f16218eef30a2c8a8a83818110610fa157610fa1611b19565b9050602002016020810190610fb691906119c4565b8888888888604051610fcd96959493929190611d06565b60405180910390a1611042565b7f71329484728e7914e400712129e35aca265be47f09638077f79e8f0fb36ec3068a8a8381811061100d5761100d611b19565b905060200201602081019061102291906119c4565b888888888860405161103996959493929190611d06565b60405180910390a15b8061104c81611b45565b915050610c19565b50505050505050505050565b600080516020611e95833981519152611078816113b5565b600480546040805163722713f760e01b815290516000936001600160a01b03909316803193909263722713f792818301926020928290030181865afa1580156110c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e99190611b5e565b6110f39190611c62565b90506103e881111561115e576004805460408051637bb2a0bb60e11b815290516001600160a01b039092169263f765417692828201926000929082900301818387803b15801561114257600080fd5b505af1158015611156573d6000803e3d6000fd5b505050505050565b600560009054906101000a90046001600160a01b03166001600160a01b031663d294f0936040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111ae57600080fd5b505af11580156111c2573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b0316638119c0656040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561114257600080fd5b600154604051631703e5f960e01b81526001600160a01b03838116600483015290911690631703e5f9906024016020604051808303816000875af1158015611262573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112869190611d40565b80156112fd575060015460405163aa79979b60e01b81526001600160a01b0383811660048301529091169063aa79979b906024016020604051808303816000875af11580156112d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fd9190611d40565b156113b257806001600160a01b03166382bfefc86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611c91565b6001600160a01b031663f083be3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561139e57600080fd5b505af1158015610505573d6000803e3d6000fd5b50565b6113b28133611755565b6001600160a01b0381166113d257600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6113fe8282610786565b6105b6576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556114343390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6114828282610786565b156105b6576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0381166114f057600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661152557600080fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661155a57600080fd5b806001600160a01b031663ce08baa76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611598573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115bc9190611c91565b600580546001600160a01b0319166001600160a01b039290921691821790556115e457600080fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600154604051631703e5f960e01b81526001600160a01b03838116600483015290911690631703e5f9906024016020604051808303816000875af1158015611652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116769190611d40565b80156116ed575060015460405163aa79979b60e01b81526001600160a01b0383811660048301529091169063aa79979b906024016020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed9190611d40565b156113b257806001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af1158015611731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105df9190611d62565b61175f8282610786565b6105b65761176c816117ae565b6117778360206117c0565b604051602001611788929190611db6565b60408051601f198184030181529082905262461bcd60e51b825261049c91600401611e2b565b606061045d6001600160a01b03831660145b606060006117cf836002611e5e565b6117da906002611c62565b67ffffffffffffffff8111156117f2576117f2611b77565b6040519080825280601f01601f19166020018201604052801561181c576020820181803683370190505b509050600360fc1b8160008151811061183757611837611b19565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061186657611866611b19565b60200101906001600160f81b031916908160001a905350600061188a846002611e5e565b611895906001611c62565b90505b600181111561190d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118c9576118c9611b19565b1a60f81b8282815181106118df576118df611b19565b60200101906001600160f81b031916908160001a90535060049490941c9361190681611e7d565b9050611898565b50831561195c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161049c565b9392505050565b60006020828403121561197557600080fd5b81356001600160e01b03198116811461195c57600080fd5b600080604083850312156119a057600080fd5b50508035926020909101359150565b6001600160a01b03811681146113b257600080fd5b6000602082840312156119d657600080fd5b813561195c816119af565b6000602082840312156119f357600080fd5b5035919050565b60008060408385031215611a0d57600080fd5b823591506020830135611a1f816119af565b809150509250929050565b600081518084526020808501945080840160005b83811015611a635781516001600160a01b031687529582019590820190600101611a3e565b509495945050505050565b606081526000611a816060830186611a2a565b8281036020840152611a938186611a2a565b915050826040830152949350505050565b60008060208385031215611ab757600080fd5b823567ffffffffffffffff80821115611acf57600080fd5b818501915085601f830112611ae357600080fd5b813581811115611af257600080fd5b8660208260051b8501011115611b0757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b5757611b57611b2f565b5060010190565b600060208284031215611b7057600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b8051611b98816119af565b919050565b60006020808385031215611bb057600080fd5b825167ffffffffffffffff80821115611bc857600080fd5b818501915085601f830112611bdc57600080fd5b815181811115611bee57611bee611b77565b8060051b604051601f19603f83011681018181108582111715611c1357611c13611b77565b604052918252848201925083810185019188831115611c3157600080fd5b938501935b82851015611c5657611c4785611b8d565b84529385019392850192611c36565b98975050505050505050565b60008219821115611c7557611c75611b2f565b500190565b600082821015611c8c57611c8c611b2f565b500390565b600060208284031215611ca357600080fd5b815161195c816119af565b602080825282518282018190526000919060409081850190868401855b82811015611cf957815180516001600160a01b03168552860151868501529284019290850190600101611ccb565b5091979650505050505050565b6001600160a01b0396871681529486166020860152928516604085015293166060830152608082019290925260a081019190915260c00190565b600060208284031215611d5257600080fd5b8151801515811461195c57600080fd5b60008060408385031215611d7557600080fd5b505080516020909101519092909150565b60005b83811015611da1578181015183820152602001611d89565b83811115611db0576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611dee816017850160208801611d86565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e1f816028840160208801611d86565b01602801949350505050565b6020815260008251806020840152611e4a816040850160208701611d86565b601f01601f19169190910160400192915050565b6000816000190483118215151615611e7857611e78611b2f565b500290565b600081611e8c57611e8c611b2f565b50600019019056fe25cf2b509f2a7f322675b2a5322b182f44ad2c03ac941a0af17c9b178f5d5d5fa2646970667358221220e92f3b335a348818161fc62fc0253431d71d3a16005044149d6c3b7c35462a3164736f6c634300080d003300000000000000000000000040247ba1012404134958da41b6bd93be1cd5bf3f000000000000000000000000a1462dbfb0198ef054454a2e9b5757392cef819c00000000000000000000000027e774110e4dd1f3a249bfce40d1f6bda4cae30000000000000000000000000055e3427906795d833ac6810486e977dca72e1532

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101cf5760003560e01c806392c2becc11610104578063d547741f116100a2578063f083be3b11610071578063f083be3b146103e6578063f4f7e6a6146103ee578063f675514b14610401578063f76541761461042457600080fd5b8063d547741f14610395578063d96073cf146103a8578063e22f3c2a146103bb578063e834a834146103de57600080fd5b8063a217fddf116100de578063a217fddf1461035f578063c93fc83d14610367578063cdd1c61e1461037a578063d294f0931461038d57600080fd5b806392c2becc146103245780639e9b88e714610339578063a14124c21461034c57600080fd5b80632f2ff15d1161017157806346c96aac1161014b57806346c96aac146102d45780634bc2a657146102e75780635574f46d146102fa57806391d148541461031157600080fd5b80632f2ff15d1461029b57806336568abe146102ae5780633cd8045e146102c157600080fd5b80630d52333c116101ad5780630d52333c1461023c5780630f7f7a201461024f57806323130d1114610257578063248a9ca31461026a57600080fd5b806301ffc9a7146101d4578063026b35d8146101fc5780630d107c4f14610211575b600080fd5b6101e76101e2366004611963565b61042c565b60405190151581526020015b60405180910390f35b61020f61020a36600461198d565b610463565b005b600354610224906001600160a01b031681565b6040516001600160a01b0390911681526020016101f3565b600254610224906001600160a01b031681565b6101e761050c565b61020f6102653660046119c4565b6105a2565b61028d6102783660046119e1565b60009081526020819052604090206001015490565b6040519081526020016101f3565b61020f6102a93660046119fa565b6105ba565b61020f6102bc3660046119fa565b6105e4565b600454610224906001600160a01b031681565b600154610224906001600160a01b031681565b61020f6102f53660046119c4565b61065e565b610302610672565b6040516101f393929190611a6e565b6101e761031f3660046119fa565b610786565b61028d600080516020611e9583398151915281565b61020f6103473660046119c4565b6107af565b600554610224906001600160a01b031681565b61028d600081565b61020f6103753660046119c4565b6107c3565b61020f61038836600461198d565b6107d7565b61020f6108ad565b61020f6103a33660046119fa565b6109d2565b61020f6103b636600461198d565b6109f7565b6101e76103c93660046119e1565b60066020526000908152604090205460ff1681565b6101e7610a70565b61020f610ac9565b61020f6103fc366004611aa4565b610bad565b6101e761040f3660046119e1565b60076020526000908152604090205460ff1681565b61020f611060565b60006001600160e01b03198216637965db0b60e01b148061045d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b8082106104a55760405162461bcd60e51b815260206004820152600b60248201526a3bb937b7339037b93232b960a91b60448201526064015b60405180910390fd5b60006104af610672565b505080519091508083116104c357826104c5565b805b9250835b83811015610505576104f38382815181106104e6576104e6611b19565b6020026020010151611216565b806104fd81611b45565b9150506104c9565b5050505050565b600060076000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105899190611b5e565b815260208101919091526040016000205460ff16919050565b60006105ad816113b5565b6105b6826113bf565b5050565b6000828152602081905260409020600101546105d5816113b5565b6105df83836113f4565b505050565b6001600160a01b03811633146106545760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161049c565b6105b68282611478565b6000610669816113b5565b6105b6826114dd565b6060806000600260009054906101000a90046001600160a01b03166001600160a01b031663821bdcf16040518163ffffffff1660e01b8152600401600060405180830381865afa1580156106ca573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106f29190810190611b9d565b9250600360009054906101000a90046001600160a01b03166001600160a01b031663821bdcf16040518163ffffffff1660e01b8152600401600060405180830381865afa158015610747573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261076f9190810190611b9d565b91508151835161077f9190611c62565b9050909192565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b60006107ba816113b5565b6105b682611512565b60006107ce816113b5565b6105b682611547565b8082106108145760405162461bcd60e51b815260206004820152600b60248201526a3bb937b7339037b93232b960a91b604482015260640161049c565b6000806000610821610672565b9250925092508084116108345783610836565b805b8351909450855b858110156108a457818110156108745761086f85828151811061086257610862611b19565b6020026020010151611606565b610892565b610892846108828484611c7a565b8151811061086257610862611b19565b8061089c81611b45565b91505061083d565b50505050505050565b6000806108b8610672565b50815181519294509092509060008183116108d357816108d5565b825b905060005b8181101561092e57838110156108ff576108ff86828151811061086257610862611b19565b8281101561091c5761091c85828151811061086257610862611b19565b8061092681611b45565b9150506108da565b50600160066000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610988573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ac9190611b5e565b81526020810191909152604001600020805460ff19169115159190911790555050505050565b6000828152602081905260409020600101546109ed816113b5565b6105df8383611478565b600080516020611e95833981519152610a0f816113b5565b60055460405163d96073cf60e01b815260048101859052602481018490526001600160a01b039091169063d96073cf90604401600060405180830381600087803b158015610a5c57600080fd5b505af11580156108a4573d6000803e3d6000fd5b600060066000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610565573d6000803e3d6000fd5b6000610ad3610672565b5050805190915060005b81811015610b0c57610afa8382815181106104e6576104e6611b19565b80610b0481611b45565b915050610add565b50600160076000600160009054906101000a90046001600160a01b03166001600160a01b031663f8803bb66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8a9190611b5e565b81526020810191909152604001600020805460ff19169115159190911790555050565b600080516020611e95833981519152610bc5816113b5565b600080808080806002604051908082528060200260200182016040528015610c1357816020015b6040805180820190915260008082526020820152815260200190600190039081610bec5790505b50905060005b8881101561105457898982818110610c3357610c33611b19565b9050602002016020810190610c4891906119c4565b6001600160a01b03166353e978686040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca99190611c91565b9650898982818110610cbd57610cbd611b19565b9050602002016020810190610cd291906119c4565b6001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d339190611c91565b9550898982818110610d4757610d47611b19565b9050602002016020810190610d5c91906119c4565b6001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbd9190611c91565b6040516370a0823160e01b81526001600160a01b038981166004830152919650908716906370a0823190602401602060405180830381865afa158015610e07573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2b9190611b5e565b6040516370a0823160e01b81526001600160a01b038981166004830152919550908616906370a0823190602401602060405180830381865afa158015610e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e999190611b5e565b92506040518060400160405280876001600160a01b031681526020018581525082600081518110610ecc57610ecc611b19565b60200260200101819052506040518060400160405280866001600160a01b031681526020018481525082600181518110610f0857610f08611b19565b60209081029190910101526040516337eb71e560e21b81526001600160a01b0388169063dfadc79490610f3f908590600401611cae565b600060405180830381600087803b158015610f5957600080fd5b505af1925050508015610f6a575060015b610fda577f4d7afda1a3fa106fa973fb1f1d1800f4384af4398faf7e2f16f16218eef30a2c8a8a83818110610fa157610fa1611b19565b9050602002016020810190610fb691906119c4565b8888888888604051610fcd96959493929190611d06565b60405180910390a1611042565b7f71329484728e7914e400712129e35aca265be47f09638077f79e8f0fb36ec3068a8a8381811061100d5761100d611b19565b905060200201602081019061102291906119c4565b888888888860405161103996959493929190611d06565b60405180910390a15b8061104c81611b45565b915050610c19565b50505050505050505050565b600080516020611e95833981519152611078816113b5565b600480546040805163722713f760e01b815290516000936001600160a01b03909316803193909263722713f792818301926020928290030181865afa1580156110c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e99190611b5e565b6110f39190611c62565b90506103e881111561115e576004805460408051637bb2a0bb60e11b815290516001600160a01b039092169263f765417692828201926000929082900301818387803b15801561114257600080fd5b505af1158015611156573d6000803e3d6000fd5b505050505050565b600560009054906101000a90046001600160a01b03166001600160a01b031663d294f0936040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156111ae57600080fd5b505af11580156111c2573d6000803e3d6000fd5b50505050600560009054906101000a90046001600160a01b03166001600160a01b0316638119c0656040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561114257600080fd5b600154604051631703e5f960e01b81526001600160a01b03838116600483015290911690631703e5f9906024016020604051808303816000875af1158015611262573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112869190611d40565b80156112fd575060015460405163aa79979b60e01b81526001600160a01b0383811660048301529091169063aa79979b906024016020604051808303816000875af11580156112d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fd9190611d40565b156113b257806001600160a01b03166382bfefc86040518163ffffffff1660e01b8152600401602060405180830381865afa158015611340573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113649190611c91565b6001600160a01b031663f083be3b6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561139e57600080fd5b505af1158015610505573d6000803e3d6000fd5b50565b6113b28133611755565b6001600160a01b0381166113d257600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6113fe8282610786565b6105b6576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556114343390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6114828282610786565b156105b6576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0381166114f057600080fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661152557600080fd5b600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661155a57600080fd5b806001600160a01b031663ce08baa76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611598573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115bc9190611c91565b600580546001600160a01b0319166001600160a01b039290921691821790556115e457600080fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600154604051631703e5f960e01b81526001600160a01b03838116600483015290911690631703e5f9906024016020604051808303816000875af1158015611652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116769190611d40565b80156116ed575060015460405163aa79979b60e01b81526001600160a01b0383811660048301529091169063aa79979b906024016020604051808303816000875af11580156116c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ed9190611d40565b156113b257806001600160a01b031663d294f0936040518163ffffffff1660e01b815260040160408051808303816000875af1158015611731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105df9190611d62565b61175f8282610786565b6105b65761176c816117ae565b6117778360206117c0565b604051602001611788929190611db6565b60408051601f198184030181529082905262461bcd60e51b825261049c91600401611e2b565b606061045d6001600160a01b03831660145b606060006117cf836002611e5e565b6117da906002611c62565b67ffffffffffffffff8111156117f2576117f2611b77565b6040519080825280601f01601f19166020018201604052801561181c576020820181803683370190505b509050600360fc1b8160008151811061183757611837611b19565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061186657611866611b19565b60200101906001600160f81b031916908160001a905350600061188a846002611e5e565b611895906001611c62565b90505b600181111561190d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106118c9576118c9611b19565b1a60f81b8282815181106118df576118df611b19565b60200101906001600160f81b031916908160001a90535060049490941c9361190681611e7d565b9050611898565b50831561195c5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161049c565b9392505050565b60006020828403121561197557600080fd5b81356001600160e01b03198116811461195c57600080fd5b600080604083850312156119a057600080fd5b50508035926020909101359150565b6001600160a01b03811681146113b257600080fd5b6000602082840312156119d657600080fd5b813561195c816119af565b6000602082840312156119f357600080fd5b5035919050565b60008060408385031215611a0d57600080fd5b823591506020830135611a1f816119af565b809150509250929050565b600081518084526020808501945080840160005b83811015611a635781516001600160a01b031687529582019590820190600101611a3e565b509495945050505050565b606081526000611a816060830186611a2a565b8281036020840152611a938186611a2a565b915050826040830152949350505050565b60008060208385031215611ab757600080fd5b823567ffffffffffffffff80821115611acf57600080fd5b818501915085601f830112611ae357600080fd5b813581811115611af257600080fd5b8660208260051b8501011115611b0757600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611b5757611b57611b2f565b5060010190565b600060208284031215611b7057600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b8051611b98816119af565b919050565b60006020808385031215611bb057600080fd5b825167ffffffffffffffff80821115611bc857600080fd5b818501915085601f830112611bdc57600080fd5b815181811115611bee57611bee611b77565b8060051b604051601f19603f83011681018181108582111715611c1357611c13611b77565b604052918252848201925083810185019188831115611c3157600080fd5b938501935b82851015611c5657611c4785611b8d565b84529385019392850192611c36565b98975050505050505050565b60008219821115611c7557611c75611b2f565b500190565b600082821015611c8c57611c8c611b2f565b500390565b600060208284031215611ca357600080fd5b815161195c816119af565b602080825282518282018190526000919060409081850190868401855b82811015611cf957815180516001600160a01b03168552860151868501529284019290850190600101611ccb565b5091979650505050505050565b6001600160a01b0396871681529486166020860152928516604085015293166060830152608082019290925260a081019190915260c00190565b600060208284031215611d5257600080fd5b8151801515811461195c57600080fd5b60008060408385031215611d7557600080fd5b505080516020909101519092909150565b60005b83811015611da1578181015183820152602001611d89565b83811115611db0576000848401525b50505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351611dee816017850160208801611d86565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351611e1f816028840160208801611d86565b01602801949350505050565b6020815260008251806020840152611e4a816040850160208701611d86565b601f01601f19169190910160400192915050565b6000816000190483118215151615611e7857611e78611b2f565b500290565b600081611e8c57611e8c611b2f565b50600019019056fe25cf2b509f2a7f322675b2a5322b182f44ad2c03ac941a0af17c9b178f5d5d5fa2646970667358221220e92f3b335a348818161fc62fc0253431d71d3a16005044149d6c3b7c35462a3164736f6c634300080d0033

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

00000000000000000000000040247ba1012404134958da41b6bd93be1cd5bf3f000000000000000000000000a1462dbfb0198ef054454a2e9b5757392cef819c00000000000000000000000027e774110e4dd1f3a249bfce40d1f6bda4cae30000000000000000000000000055e3427906795d833ac6810486e977dca72e1532

-----Decoded View---------------
Arg [0] : _voter (address): 0x40247ba1012404134958dA41b6Bd93Be1cD5BF3f
Arg [1] : _gaugeFactory (address): 0xA1462DbfB0198Ef054454A2E9b5757392ceF819c
Arg [2] : _gaugeFactoryCL (address): 0x27E774110e4dD1f3A249BFCe40D1f6BDa4cAe300
Arg [3] : _splitter (address): 0x55e3427906795d833Ac6810486e977Dca72e1532

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000040247ba1012404134958da41b6bd93be1cd5bf3f
Arg [1] : 000000000000000000000000a1462dbfb0198ef054454a2e9b5757392cef819c
Arg [2] : 00000000000000000000000027e774110e4dd1f3a249bfce40d1f6bda4cae300
Arg [3] : 00000000000000000000000055e3427906795d833ac6810486e977dca72e1532


Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits

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