GLMR Price: $0.016523 (-4.90%)

Contract

0x8C7d87A2bAb7b48C4767983483E339eC0C8785a8

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Candidate Confir...41685352023-08-08 9:36:39909 days ago1691487399IN
0x8C7d87A2...C0C8785a8
0 GLMR0.00416735146.47470467
Set Owner Candid...41610052023-08-07 8:17:24910 days ago1691396244IN
0x8C7d87A2...C0C8785a8
0 GLMR0.00704788149.25
Set Fee To41609982023-08-07 8:16:04910 days ago1691396164IN
0x8C7d87A2...C0C8785a8
0 GLMR0.00411213136.76125
Set Discount Sto...39765682023-07-12 9:50:30936 days ago1689155430IN
0x8C7d87A2...C0C8785a8
0 GLMR0.00622579132.08152638

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
143144682026-02-01 19:28:1219 hrs ago1769974092
0x8C7d87A2...C0C8785a8
0 GLMR
143144682026-02-01 19:28:1219 hrs ago1769974092
0x8C7d87A2...C0C8785a8
0 GLMR
143144682026-02-01 19:28:1219 hrs ago1769974092
0x8C7d87A2...C0C8785a8
0 GLMR
143144682026-02-01 19:28:1219 hrs ago1769974092
0x8C7d87A2...C0C8785a8
0 GLMR
143144682026-02-01 19:28:1219 hrs ago1769974092
0x8C7d87A2...C0C8785a8
0 GLMR
143144682026-02-01 19:28:1219 hrs ago1769974092
0x8C7d87A2...C0C8785a8
0 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
1,347.9413455 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
0 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
0 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
1.34929063 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
0 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
0 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
0 GLMR
143141772026-02-01 18:52:5420 hrs ago1769971974
0x8C7d87A2...C0C8785a8
1,349.29063613 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
1,324.32496971 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
0 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
0 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
1.32565062 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
0 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
0 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
0 GLMR
143136812026-02-01 17:56:3621 hrs ago1769968596
0x8C7d87A2...C0C8785a8
1,325.65062033 GLMR
143133322026-02-01 17:15:2421 hrs ago1769966124
0x8C7d87A2...C0C8785a8
1,152.11619765 GLMR
143133322026-02-01 17:15:2421 hrs ago1769966124
0x8C7d87A2...C0C8785a8
0 GLMR
143133322026-02-01 17:15:2421 hrs ago1769966124
0x8C7d87A2...C0C8785a8
0 GLMR
View All Internal Transactions
Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeSettlement

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at moonbeam.moonscan.io on 2023-07-12
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

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

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

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

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

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

// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 functionCallWithValue(target, data, 0, defaultRevert);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with a
     * `customRevert` function as a fallback when `target` reverts.
     *
     * Requirements:
     *
     * - `customRevert` must be a reverting function.
     *
     * _Available since v5.0._
     */
    function functionCall(
        address target,
        bytes memory data,
        function() internal view customRevert
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, customRevert);
    }

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

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with a `customRevert` function as a fallback revert reason when `target` reverts.
     *
     * Requirements:
     *
     * - `customRevert` must be a reverting function.
     *
     * _Available since v5.0._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        function() internal view customRevert
    ) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, customRevert);
    }

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

    /**
     * @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,
        function() internal view customRevert
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, customRevert);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        function() internal view customRevert
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, customRevert);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided `customRevert`) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v5.0._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        function() internal view customRevert
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check if target is a contract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                if (target.code.length == 0) {
                    revert AddressEmptyCode(target);
                }
            }
            return returndata;
        } else {
            _revert(returndata, customRevert);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or with a default revert error.
     *
     * _Available since v5.0._
     */
    function verifyCallResult(bool success, bytes memory returndata) internal view returns (bytes memory) {
        return verifyCallResult(success, returndata, defaultRevert);
    }

    /**
     * @dev Same as {xref-Address-verifyCallResult-bool-bytes-}[`verifyCallResult`], but with a
     * `customRevert` function as a fallback when `success` is `false`.
     *
     * Requirements:
     *
     * - `customRevert` must be a reverting function.
     *
     * _Available since v5.0._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        function() internal view customRevert
    ) internal view returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, customRevert);
        }
    }

    /**
     * @dev Default reverting function when no `customRevert` is provided in a function call.
     */
    function defaultRevert() internal pure {
        revert FailedInnerCall();
    }

    function _revert(bytes memory returndata, function() internal view customRevert) private view {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            customRevert();
            revert FailedInnerCall();
        }
    }
}

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

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        if (nonceAfter != nonceBefore + 1) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

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

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
/// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller.
library SafeTransferLib {
    /*//////////////////////////////////////////////////////////////
                             ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Transfer the ETH and store if it succeeded or not.
            success := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(success, "ETH_TRANSFER_FAILED");
    }

    /*//////////////////////////////////////////////////////////////
                            ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 100, 0, 32)
            )
        }

        require(success, "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool success;

        /// @solidity memory-safe-assembly
        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata into memory, beginning with the function selector.
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000)
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type.

            success := and(
                // Set success to whether the call reverted, if not we check it either
                // returned exactly 1 (can't just be non-zero data), or had no return data.
                or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())),
                // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2.
                // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space.
                // Counterintuitively, this call must be positioned second to the or() call in the
                // surrounding and() call or else returndatasize() will be zero during the computation.
                call(gas(), token, 0, freeMemoryPointer, 68, 0, 32)
            )
        }

        require(success, "APPROVE_FAILED");
    }
}

library Constants {
    /// @dev Used as a flag for identifying the transfer of ETH instead of a token
    address internal constant NATIVE_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
    /// @dev Used as a impossible pool address
    address internal constant IMPOSSIBLE_POOL_ADDRESS = 0x0000000000000000000000000000000000000001;
    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
}

type Currency is address;

/// @title CurrencyLibrary
/// @dev This library allows for transferring and holding native tokens and ERC20 tokens
library CurrencyLibrary {
    using CurrencyLibrary for Currency;
    using SafeERC20 for IERC20;
    using SafeTransferLib for address;

    /// @notice Thrown when a native transfer fails
    error NativeTransferFailed();

    /// @notice Thrown when an ERC20 transfer fails
    error ERC20TransferFailed();

    /// @notice Thrown when an ERC20 approve fails
    error ERC20ApproveFailed();

    Currency public constant NATIVE = Currency.wrap(Constants.NATIVE_ADDRESS);

    function transfer(Currency currency, address to, uint256 amount) internal {
        if (currency.isNative()) {
            to.safeTransferETH(amount);
        } else {
            IERC20(Currency.unwrap(currency)).safeTransfer(to, amount);
        }
    }

    function transferFrom(Currency currency, address from, address to, uint256 amount) internal {
        if (currency.isNative()) {
            revert NativeTransferFailed();
        } else {
            IERC20(Currency.unwrap(currency)).safeTransferFrom(from, to, amount);
        }
    }

    function approve(Currency currency, address to, uint256 amount) internal {
        if (currency.isNative()) {
            revert ERC20ApproveFailed();
        } else {
            IERC20(Currency.unwrap(currency)).safeIncreaseAllowance(to, amount);
        }
    }

    function balanceOfSelf(Currency currency) internal view returns (uint256) {
        return balanceOf(currency, address(this));
    }

    function balanceOf(Currency currency, address owner) internal view returns (uint256) {
        if (currency.isNative()) {
            return owner.balance;
        } else {
            return IERC20(Currency.unwrap(currency)).balanceOf(owner);
        }
    }

    function equals(Currency currency, Currency other) internal pure returns (bool) {
        return Currency.unwrap(currency) == Currency.unwrap(other);
    }

    function isNative(Currency currency) internal pure returns (bool) {
        return Currency.unwrap(currency) == Currency.unwrap(NATIVE);
    }
}

interface IFeeSettlement {
    function processSettlement(Currency dstToken, uint256 minReturnAmount, address from, address to) external;
}

interface IReferralStorage {
    function codeOwners(bytes32 _code) external view returns (address);
    function getReferralInfo(address _account) external view returns (bytes32, address);
    function getOwnedCodes(address _account) external view returns (bytes32[] memory);
    function setReferralCodeByUser(bytes32 _code) external;
}

interface IDiscountStorage {
    function getDiscount(address user) external view returns (uint256 discount, uint256 basis);
}

/// @notice Gas optimized reentrancy protection for smart contracts.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol)
/// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
abstract contract ReentrancyGuard {
    uint256 private locked = 1;

    modifier nonReentrant() virtual {
        require(locked == 1, "REENTRANCY");

        locked = 2;

        _;

        locked = 1;
    }
}

abstract contract EthReceiver {
    error EthDepositRejected();

    receive() external payable {
        _receive();
    }

    function _receive() internal virtual {
        if (msg.sender == tx.origin) revert EthDepositRejected();
    }
}

abstract contract Ownable {
    address public owner;
    address public ownerCandidate;

    error InvalidCaller();
    error NotCandidate();

    /// @notice Emitted when the owner of the factory is changed
    /// @param oldOwner The owner before the owner was changed
    /// @param newOwner The owner after the owner was changed
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    event Candidate(address indexed newOwner);

    modifier onlyOwner() {
        if (msg.sender != owner) revert InvalidCaller();
        _;
    }

    constructor() {
        owner = msg.sender;
        emit OwnerChanged(address(0), msg.sender);
    }

    function setOwnerCandidate(address _candidate) external onlyOwner {
        ownerCandidate = _candidate;
        emit Candidate(_candidate);
    }

    function candidateConfirm() external {
        if (msg.sender != ownerCandidate) revert NotCandidate();
        emit OwnerChanged(owner, ownerCandidate);
        owner = ownerCandidate;
        ownerCandidate = address(0);
    }
}

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

contract FeeSettlement is IFeeSettlement, Ownable, ReentrancyGuard, EthReceiver {
    using CurrencyLibrary for Currency;

    error InvalidFeeShare();
    error InvalidFeeDiscount();
    error InvalidFeeRebate();
    error InsufficientOutAmount();

    Currency public immutable weth;

    uint256 public constant BASIS_POINTS = 10000;
    uint256 public constant MAX_FEE_POINTS = 30; // 0.3%

    IReferralStorage public referralStorage;
    uint256 public feeShare; // e.g. 10 for 0.1%
    uint256 public feeDiscount; // e.g. 2000 for 20%
    uint256 public feeRebate; // e.g. 5000 for 50%/50%, 2500 for 75% fee/25% rebate
    address public feeTo;

    IDiscountStorage public discountStorage;

    event PayRebates(
        address trader,
        address referrer,
        Currency dstToken,
        uint256 discountAmount,
        uint256 rebateAmount
    );
    event SetReferralStorage(IReferralStorage referralStorage);
    event SetDiscountStorage(IDiscountStorage discountStorage);
    event SetFeeShare(uint256 feeShare);
    event SetFeeDiscount(uint256 feeDiscount);
    event SetFeeRebate(uint256 feeRebate);
    event SetFeeTo(address feeTo);

    constructor(
        Currency _weth, 
        IReferralStorage _referralStorage,
        uint256 _feeShare,
        uint256 _feeDiscount,
        uint256 _feeRebate,
        address _feeTo
    ) {
        weth = _weth;
        referralStorage = _referralStorage;

        if (_feeShare > MAX_FEE_POINTS) revert InvalidFeeShare();
        if (_feeDiscount > BASIS_POINTS) revert InvalidFeeDiscount();
        if (_feeRebate > BASIS_POINTS) revert InvalidFeeRebate();
        feeShare = _feeShare;
        feeDiscount = _feeDiscount;
        feeRebate = _feeRebate;
        feeTo = _feeTo;
    }

    function processSettlement(
        Currency dstToken,
        uint256 minReturnAmount,
        address from,
        address to
    ) external override nonReentrant {
        bool dstNative = dstToken.isNative();
        uint256 amount = dstToken.balanceOfSelf();
        if (amount < minReturnAmount) revert InsufficientOutAmount();
        (, address referrer) = referralStorage.getReferralInfo(from);
        uint256 basisfee = (amount * feeShare) / BASIS_POINTS;
        if (address(discountStorage) != address(0)) {
            (uint256 discount, uint256 basis) = discountStorage.getDiscount(from);
            basisfee = (basisfee * (basis - discount)) / basis;
        }
        uint256 fee = referrer == address(0) 
            ? basisfee
            : (basisfee * (BASIS_POINTS - feeDiscount)) / BASIS_POINTS;
        if (amount - fee < minReturnAmount) {
            // ensure that fee do not cause the transaction to fail 
            fee = amount - minReturnAmount;
        }
        if (referrer != address(0)) {
            uint256 rebateAmount = (fee * feeRebate) / BASIS_POINTS;
            if (dstNative) {
                IWETH(Currency.unwrap(weth)).deposit{value: fee}();
                weth.transfer(referrer, rebateAmount);
                weth.transfer(feeTo, weth.balanceOfSelf());
            } else {
                dstToken.transfer(referrer, rebateAmount);
                dstToken.transfer(feeTo, fee - rebateAmount);
            }
            emit PayRebates(from, referrer, dstToken, basisfee - fee, rebateAmount);
        } else {
            if (dstNative) {
                IWETH(Currency.unwrap(weth)).deposit{value: fee}();
                weth.transfer(feeTo, weth.balanceOfSelf());
            } else {
                dstToken.transfer(feeTo, fee);
            }
        }
        if (dstNative) {
            CurrencyLibrary.NATIVE.transfer(to, amount - fee);
        } else {
            dstToken.transfer(to, amount - fee);
        }
    }

    function setReferralStorage(IReferralStorage _referralStorage) external onlyOwner {
        referralStorage = _referralStorage;
        emit SetReferralStorage(_referralStorage);
    }

    function setDiscountStorage(IDiscountStorage _discountStorage) external onlyOwner {
        discountStorage = _discountStorage;
        emit SetDiscountStorage(_discountStorage);
    }

    function setFeeShare(uint256 _feeShare) external onlyOwner {
        if (_feeShare > MAX_FEE_POINTS) revert InvalidFeeShare();
        feeShare = _feeShare;
        emit SetFeeShare(_feeShare);
    }

    function setFeeDiscount(uint256 _feeDiscount) external onlyOwner {
        if (_feeDiscount > BASIS_POINTS) revert InvalidFeeDiscount();
        feeDiscount = _feeDiscount;
        emit SetFeeDiscount(_feeDiscount);
    }

    function setFeeRebate(uint256 _feeRebate) external onlyOwner {
        if (_feeRebate > BASIS_POINTS) revert InvalidFeeRebate();
        feeRebate = _feeRebate;
        emit SetFeeRebate(_feeRebate);
    }

    function setFeeTo(address _feeTo) external onlyOwner {
        feeTo = _feeTo;
        emit SetFeeTo(_feeTo);
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"Currency","name":"_weth","type":"address"},{"internalType":"contract IReferralStorage","name":"_referralStorage","type":"address"},{"internalType":"uint256","name":"_feeShare","type":"uint256"},{"internalType":"uint256","name":"_feeDiscount","type":"uint256"},{"internalType":"uint256","name":"_feeRebate","type":"uint256"},{"internalType":"address","name":"_feeTo","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"EthDepositRejected","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InsufficientOutAmount","type":"error"},{"inputs":[],"name":"InvalidCaller","type":"error"},{"inputs":[],"name":"InvalidFeeDiscount","type":"error"},{"inputs":[],"name":"InvalidFeeRebate","type":"error"},{"inputs":[],"name":"InvalidFeeShare","type":"error"},{"inputs":[],"name":"NotCandidate","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"Candidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnerChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"trader","type":"address"},{"indexed":false,"internalType":"address","name":"referrer","type":"address"},{"indexed":false,"internalType":"Currency","name":"dstToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"discountAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rebateAmount","type":"uint256"}],"name":"PayRebates","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IDiscountStorage","name":"discountStorage","type":"address"}],"name":"SetDiscountStorage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeDiscount","type":"uint256"}],"name":"SetFeeDiscount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeRebate","type":"uint256"}],"name":"SetFeeRebate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeShare","type":"uint256"}],"name":"SetFeeShare","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"feeTo","type":"address"}],"name":"SetFeeTo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IReferralStorage","name":"referralStorage","type":"address"}],"name":"SetReferralStorage","type":"event"},{"inputs":[],"name":"BASIS_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_FEE_POINTS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"candidateConfirm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"discountStorage","outputs":[{"internalType":"contract IDiscountStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDiscount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRebate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerCandidate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"Currency","name":"dstToken","type":"address"},{"internalType":"uint256","name":"minReturnAmount","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"processSettlement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"referralStorage","outputs":[{"internalType":"contract IReferralStorage","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IDiscountStorage","name":"_discountStorage","type":"address"}],"name":"setDiscountStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeDiscount","type":"uint256"}],"name":"setFeeDiscount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeRebate","type":"uint256"}],"name":"setFeeRebate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeShare","type":"uint256"}],"name":"setFeeShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTo","type":"address"}],"name":"setFeeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"}],"name":"setOwnerCandidate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IReferralStorage","name":"_referralStorage","type":"address"}],"name":"setReferralStorage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"Currency","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405260016002553480156200001657600080fd5b506040516200150038038062001500833981016040819052620000399162000158565b600080546001600160a01b0319163390811782556040519091907fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c908290a36001600160a01b03868116608052600380546001600160a01b031916918716919091179055601e841115620000c05760405163e8cdd5bd60e01b815260040160405180910390fd5b612710831115620000e457604051630823099f60e31b815260040160405180910390fd5b612710821115620001085760405163b8e2132f60e01b815260040160405180910390fd5b600493909355600591909155600655600780546001600160a01b0319166001600160a01b0390921691909117905550620001c99050565b6001600160a01b03811681146200015557600080fd5b50565b60008060008060008060c087890312156200017257600080fd5b86516200017f816200013f565b602088015190965062000192816200013f565b8095505060408701519350606087015192506080870151915060a0870151620001bb816200013f565b809150509295509295509295565b6080516112f16200020f6000396000818161021a0152818161099801528181610a1601528181610a5a01528181610a8901528181610b6b0152610bf601526112f16000f3fe6080604052600436106101625760003560e01c80639a2f2dfa116100c0578063e1f1c4a711610074578063ee18077311610059578063ee18077314610397578063f46901ed146103b7578063f5a63266146103d757600080fd5b8063e1f1c4a71461036b578063e9ade90e1461038157600080fd5b8063b3cba4a2116100a5578063b3cba4a214610316578063bee514e714610336578063bf7ca56e1461035657600080fd5b80639a2f2dfa146102d6578063ae4d7f9a146102f657600080fd5b80633ffcf5ab116101175780636f41bdf9116100fc5780636f41bdf914610280578063731c2f81146102a05780638da5cb5b146102b657600080fd5b80633ffcf5ab1461023c5780635f504a821461026057600080fd5b80632ffdf7c6116101485780632ffdf7c6146101d35780633f023230146101f35780633fc8cef31461020857600080fd5b80626cc35e14610176578063017e7e58146101b357600080fd5b366101715761016f6103f7565b005b600080fd5b34801561018257600080fd5b50600354610196906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101bf57600080fd5b50600754610196906001600160a01b031681565b3480156101df57600080fd5b50600854610196906001600160a01b031681565b3480156101ff57600080fd5b5061016f610419565b34801561021457600080fd5b506101967f000000000000000000000000000000000000000000000000000000000000000081565b34801561024857600080fd5b5061025260055481565b6040519081526020016101aa565b34801561026c57600080fd5b50600154610196906001600160a01b031681565b34801561028c57600080fd5b5061016f61029b366004611112565b6104a8565b3480156102ac57600080fd5b5061025260065481565b3480156102c257600080fd5b50600054610196906001600160a01b031681565b3480156102e257600080fd5b5061016f6102f1366004611112565b610528565b34801561030257600080fd5b5061016f610311366004611112565b61059d565b34801561032257600080fd5b5061016f61033136600461112f565b610616565b34801561034257600080fd5b5061016f61035136600461112f565b610698565b34801561036257600080fd5b50610252601e81565b34801561037757600080fd5b5061025261271081565b34801561038d57600080fd5b5061025260045481565b3480156103a357600080fd5b5061016f6103b2366004611148565b61071b565b3480156103c357600080fd5b5061016f6103d2366004611112565b610c9e565b3480156103e357600080fd5b5061016f6103f236600461112f565b610d17565b32330361041757604051631b10b0f960e01b815260040160405180910390fd5b565b6001546001600160a01b0316331461044457604051634f32a51b60e01b815260040160405180910390fd5b600154600080546040516001600160a01b0393841693909116917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031633146104d3576040516348f5c3ed60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f076fd4c9538368bb6e5f15a2b5962f0de58211b27bfdc8244b47840c33429abf906020015b60405180910390a150565b6000546001600160a01b03163314610553576040516348f5c3ed60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8cc40b9abca4a505a92028908f9d913d621d18112c69412806506f02333f26b490600090a250565b6000546001600160a01b031633146105c8576040516348f5c3ed60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f828abcccea18192c21d645e575652c49e20b986dab777906fc473d056b01b6a89060200161051d565b6000546001600160a01b03163314610641576040516348f5c3ed60e01b815260040160405180910390fd5b601e8111156106635760405163e8cdd5bd60e01b815260040160405180910390fd5b60048190556040518181527f110c64f8b5e69db3c5073ef38ff8c9b9153222e04cb538a860888e5822fb42d19060200161051d565b6000546001600160a01b031633146106c3576040516348f5c3ed60e01b815260040160405180910390fd5b6127108111156106e657604051630823099f60e31b815260040160405180910390fd5b60058190556040518181527fae8d964c051edf9b7a9b351b2e33c93192db37891822f728b472c9abdb0f15af9060200161051d565b6002546001146107725760405162461bcd60e51b815260206004820152600a60248201527f5245454e5452414e43590000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600280556001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8114906000906107a490610d9a565b9050848110156107c7576040516357084d7360e11b815260040160405180910390fd5b6003546040516310c3a57160e11b81526001600160a01b03868116600483015260009216906321874ae2906024016040805180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610835919061119b565b91505060006127106004548461084b91906111e1565b61085591906111f8565b6008549091506001600160a01b031615610903576008546040516303793c8d60e11b81526001600160a01b03888116600483015260009283929116906306f2791a906024016040805180830381865afa1580156108b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108da919061121a565b9092509050806108ea838261123e565b6108f490856111e1565b6108fe91906111f8565b925050505b60006001600160a01b0383161561094057612710600554612710610927919061123e565b61093190846111e1565b61093b91906111f8565b610942565b815b90508761094f828661123e565b10156109625761095f888561123e565b90505b6001600160a01b03831615610b635760006127106006548361098491906111e1565b61098e91906111f8565b90508515610ab5577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109f157600080fd5b505af1158015610a05573d6000803e3d6000fd5b50610a419350506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915086905083610dac565b600754610ab0906001600160a01b0390811690610a7f907f000000000000000000000000000000000000000000000000000000000000000016610d9a565b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169190610dac565b610af4565b610ac96001600160a01b038b168583610dac565b600754610af4906001600160a01b0316610ae3838561123e565b6001600160a01b038d169190610dac565b7f11c13103c3d0e9afd6568e050834acf21c224630afc32309390e8c23e27677d488858c610b22868861123e565b604080516001600160a01b0395861681529385166020850152919093169082015260608101919091526080810183905260a00160405180910390a150610c3a565b8415610c20577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610bc457600080fd5b505af1158015610bd8573d6000803e3d6000fd5b5050600754610c1b93506001600160a01b039081169250610a7f91507f000000000000000000000000000000000000000000000000000000000000000016610d9a565b610c3a565b600754610c3a906001600160a01b038b8116911683610dac565b8415610c6f57610c6a86610c4e838761123e565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9190610dac565b610c8e565b610c8e86610c7d838761123e565b6001600160a01b038c169190610dac565b5050600160025550505050505050565b6000546001600160a01b03163314610cc9576040516348f5c3ed60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527ff6b59ffc88fbb27f33470b919e00b41139ee340eb349521f0cbbc1504ce29c3e9060200161051d565b6000546001600160a01b03163314610d42576040516348f5c3ed60e01b815260040160405180910390fd5b612710811115610d655760405163b8e2132f60e01b815260040160405180910390fd5b60068190556040518181527fa4ed15e1d9307ea38cbd10d8b102a75209f076ff571aab3007fcabaa8351059b9060200161051d565b6000610da68230610dfc565b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610de857610de36001600160a01b03831682610ea4565b505050565b610de36001600160a01b0384168383610eff565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610e3357506001600160a01b03811631610da6565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa158015610e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9d9190611251565b9392505050565b600080600080600085875af1905080610de35760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610769565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052610de391859190600090610f7290841683610fc0565b90508051600014158015610f97575080806020019051810190610f95919061126a565b155b15610de357604051635274afe760e01b81526001600160a01b0384166004820152602401610769565b6060610e9d83836000610fd1610fea565b604051630a12f52160e11b815260040160405180910390fd5b60608247101561100f5760405163cd78605960e01b8152306004820152602401610769565b600080866001600160a01b0316858760405161102b919061128c565b60006040518083038185875af1925050503d8060008114611068576040519150601f19603f3d011682016040523d82523d6000602084013e61106d565b606091505b509150915061107e8783838761108b565b925050505b949350505050565b606083156110d95782516000036110d257846001600160a01b03163b6000036110d257604051639996b31560e01b81526001600160a01b0386166004820152602401610769565b5081611083565b61108383838151156110ee5781518083602001fd5b610fd18163ffffffff16565b6001600160a01b038116811461110f57600080fd5b50565b60006020828403121561112457600080fd5b8135610e9d816110fa565b60006020828403121561114157600080fd5b5035919050565b6000806000806080858703121561115e57600080fd5b8435611169816110fa565b9350602085013592506040850135611180816110fa565b91506060850135611190816110fa565b939692955090935050565b600080604083850312156111ae57600080fd5b8251915060208301516111c0816110fa565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610da657610da66111cb565b60008261121557634e487b7160e01b600052601260045260246000fd5b500490565b6000806040838503121561122d57600080fd5b505080516020909101519092909150565b81810381811115610da657610da66111cb565b60006020828403121561126357600080fd5b5051919050565b60006020828403121561127c57600080fd5b81518015158114610e9d57600080fd5b6000825160005b818110156112ad5760208186018101518583015201611293565b50600092019182525091905056fea264697066735822122078e6bb7188d78939bf3ff938cb548280fb791e6139cbada596b95b233896246a64736f6c63430008130033000000000000000000000000acc15dc74880c9944775448304b263d191c6077f0000000000000000000000002ec9396fb28719dacf460b1501ef7fb412aed501000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000009c40000000000000000000000004da60510480ac2c6768893bc18abbbb7c141f58d

Deployed Bytecode

0x6080604052600436106101625760003560e01c80639a2f2dfa116100c0578063e1f1c4a711610074578063ee18077311610059578063ee18077314610397578063f46901ed146103b7578063f5a63266146103d757600080fd5b8063e1f1c4a71461036b578063e9ade90e1461038157600080fd5b8063b3cba4a2116100a5578063b3cba4a214610316578063bee514e714610336578063bf7ca56e1461035657600080fd5b80639a2f2dfa146102d6578063ae4d7f9a146102f657600080fd5b80633ffcf5ab116101175780636f41bdf9116100fc5780636f41bdf914610280578063731c2f81146102a05780638da5cb5b146102b657600080fd5b80633ffcf5ab1461023c5780635f504a821461026057600080fd5b80632ffdf7c6116101485780632ffdf7c6146101d35780633f023230146101f35780633fc8cef31461020857600080fd5b80626cc35e14610176578063017e7e58146101b357600080fd5b366101715761016f6103f7565b005b600080fd5b34801561018257600080fd5b50600354610196906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101bf57600080fd5b50600754610196906001600160a01b031681565b3480156101df57600080fd5b50600854610196906001600160a01b031681565b3480156101ff57600080fd5b5061016f610419565b34801561021457600080fd5b506101967f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f81565b34801561024857600080fd5b5061025260055481565b6040519081526020016101aa565b34801561026c57600080fd5b50600154610196906001600160a01b031681565b34801561028c57600080fd5b5061016f61029b366004611112565b6104a8565b3480156102ac57600080fd5b5061025260065481565b3480156102c257600080fd5b50600054610196906001600160a01b031681565b3480156102e257600080fd5b5061016f6102f1366004611112565b610528565b34801561030257600080fd5b5061016f610311366004611112565b61059d565b34801561032257600080fd5b5061016f61033136600461112f565b610616565b34801561034257600080fd5b5061016f61035136600461112f565b610698565b34801561036257600080fd5b50610252601e81565b34801561037757600080fd5b5061025261271081565b34801561038d57600080fd5b5061025260045481565b3480156103a357600080fd5b5061016f6103b2366004611148565b61071b565b3480156103c357600080fd5b5061016f6103d2366004611112565b610c9e565b3480156103e357600080fd5b5061016f6103f236600461112f565b610d17565b32330361041757604051631b10b0f960e01b815260040160405180910390fd5b565b6001546001600160a01b0316331461044457604051634f32a51b60e01b815260040160405180910390fd5b600154600080546040516001600160a01b0393841693909116917fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c91a360018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031633146104d3576040516348f5c3ed60e01b815260040160405180910390fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f076fd4c9538368bb6e5f15a2b5962f0de58211b27bfdc8244b47840c33429abf906020015b60405180910390a150565b6000546001600160a01b03163314610553576040516348f5c3ed60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f8cc40b9abca4a505a92028908f9d913d621d18112c69412806506f02333f26b490600090a250565b6000546001600160a01b031633146105c8576040516348f5c3ed60e01b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527f828abcccea18192c21d645e575652c49e20b986dab777906fc473d056b01b6a89060200161051d565b6000546001600160a01b03163314610641576040516348f5c3ed60e01b815260040160405180910390fd5b601e8111156106635760405163e8cdd5bd60e01b815260040160405180910390fd5b60048190556040518181527f110c64f8b5e69db3c5073ef38ff8c9b9153222e04cb538a860888e5822fb42d19060200161051d565b6000546001600160a01b031633146106c3576040516348f5c3ed60e01b815260040160405180910390fd5b6127108111156106e657604051630823099f60e31b815260040160405180910390fd5b60058190556040518181527fae8d964c051edf9b7a9b351b2e33c93192db37891822f728b472c9abdb0f15af9060200161051d565b6002546001146107725760405162461bcd60e51b815260206004820152600a60248201527f5245454e5452414e43590000000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600280556001600160a01b03841673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8114906000906107a490610d9a565b9050848110156107c7576040516357084d7360e11b815260040160405180910390fd5b6003546040516310c3a57160e11b81526001600160a01b03868116600483015260009216906321874ae2906024016040805180830381865afa158015610811573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610835919061119b565b91505060006127106004548461084b91906111e1565b61085591906111f8565b6008549091506001600160a01b031615610903576008546040516303793c8d60e11b81526001600160a01b03888116600483015260009283929116906306f2791a906024016040805180830381865afa1580156108b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108da919061121a565b9092509050806108ea838261123e565b6108f490856111e1565b6108fe91906111f8565b925050505b60006001600160a01b0383161561094057612710600554612710610927919061123e565b61093190846111e1565b61093b91906111f8565b610942565b815b90508761094f828661123e565b10156109625761095f888561123e565b90505b6001600160a01b03831615610b635760006127106006548361098491906111e1565b61098e91906111f8565b90508515610ab5577f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f6001600160a01b031663d0e30db0836040518263ffffffff1660e01b81526004016000604051808303818588803b1580156109f157600080fd5b505af1158015610a05573d6000803e3d6000fd5b50610a419350506001600160a01b037f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f16915086905083610dac565b600754610ab0906001600160a01b0390811690610a7f907f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f16610d9a565b6001600160a01b037f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f169190610dac565b610af4565b610ac96001600160a01b038b168583610dac565b600754610af4906001600160a01b0316610ae3838561123e565b6001600160a01b038d169190610dac565b7f11c13103c3d0e9afd6568e050834acf21c224630afc32309390e8c23e27677d488858c610b22868861123e565b604080516001600160a01b0395861681529385166020850152919093169082015260608101919091526080810183905260a00160405180910390a150610c3a565b8415610c20577f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f6001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015610bc457600080fd5b505af1158015610bd8573d6000803e3d6000fd5b5050600754610c1b93506001600160a01b039081169250610a7f91507f000000000000000000000000acc15dc74880c9944775448304b263d191c6077f16610d9a565b610c3a565b600754610c3a906001600160a01b038b8116911683610dac565b8415610c6f57610c6a86610c4e838761123e565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9190610dac565b610c8e565b610c8e86610c7d838761123e565b6001600160a01b038c169190610dac565b5050600160025550505050505050565b6000546001600160a01b03163314610cc9576040516348f5c3ed60e01b815260040160405180910390fd5b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527ff6b59ffc88fbb27f33470b919e00b41139ee340eb349521f0cbbc1504ce29c3e9060200161051d565b6000546001600160a01b03163314610d42576040516348f5c3ed60e01b815260040160405180910390fd5b612710811115610d655760405163b8e2132f60e01b815260040160405180910390fd5b60068190556040518181527fa4ed15e1d9307ea38cbd10d8b102a75209f076ff571aab3007fcabaa8351059b9060200161051d565b6000610da68230610dfc565b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610de857610de36001600160a01b03831682610ea4565b505050565b610de36001600160a01b0384168383610eff565b600073eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b03841603610e3357506001600160a01b03811631610da6565b6040516370a0823160e01b81526001600160a01b0383811660048301528416906370a0823190602401602060405180830381865afa158015610e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9d9190611251565b9392505050565b600080600080600085875af1905080610de35760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610769565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092019092526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b179052610de391859190600090610f7290841683610fc0565b90508051600014158015610f97575080806020019051810190610f95919061126a565b155b15610de357604051635274afe760e01b81526001600160a01b0384166004820152602401610769565b6060610e9d83836000610fd1610fea565b604051630a12f52160e11b815260040160405180910390fd5b60608247101561100f5760405163cd78605960e01b8152306004820152602401610769565b600080866001600160a01b0316858760405161102b919061128c565b60006040518083038185875af1925050503d8060008114611068576040519150601f19603f3d011682016040523d82523d6000602084013e61106d565b606091505b509150915061107e8783838761108b565b925050505b949350505050565b606083156110d95782516000036110d257846001600160a01b03163b6000036110d257604051639996b31560e01b81526001600160a01b0386166004820152602401610769565b5081611083565b61108383838151156110ee5781518083602001fd5b610fd18163ffffffff16565b6001600160a01b038116811461110f57600080fd5b50565b60006020828403121561112457600080fd5b8135610e9d816110fa565b60006020828403121561114157600080fd5b5035919050565b6000806000806080858703121561115e57600080fd5b8435611169816110fa565b9350602085013592506040850135611180816110fa565b91506060850135611190816110fa565b939692955090935050565b600080604083850312156111ae57600080fd5b8251915060208301516111c0816110fa565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610da657610da66111cb565b60008261121557634e487b7160e01b600052601260045260246000fd5b500490565b6000806040838503121561122d57600080fd5b505080516020909101519092909150565b81810381811115610da657610da66111cb565b60006020828403121561126357600080fd5b5051919050565b60006020828403121561127c57600080fd5b81518015158114610e9d57600080fd5b6000825160005b818110156112ad5760208186018101518583015201611293565b50600092019182525091905056fea264697066735822122078e6bb7188d78939bf3ff938cb548280fb791e6139cbada596b95b233896246a64736f6c63430008130033

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

000000000000000000000000acc15dc74880c9944775448304b263d191c6077f0000000000000000000000002ec9396fb28719dacf460b1501ef7fb412aed501000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000007d000000000000000000000000000000000000000000000000000000000000009c40000000000000000000000004da60510480ac2c6768893bc18abbbb7c141f58d

-----Decoded View---------------
Arg [0] : _weth (address): 0xAcc15dC74880C9944775448304B263D191c6077F
Arg [1] : _referralStorage (address): 0x2ec9396fB28719dAcF460b1501ef7Fb412Aed501
Arg [2] : _feeShare (uint256): 10
Arg [3] : _feeDiscount (uint256): 2000
Arg [4] : _feeRebate (uint256): 2500
Arg [5] : _feeTo (address): 0x4dA60510480aC2c6768893bC18aBBBb7c141f58D

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000acc15dc74880c9944775448304b263d191c6077f
Arg [1] : 0000000000000000000000002ec9396fb28719dacf460b1501ef7fb412aed501
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [3] : 00000000000000000000000000000000000000000000000000000000000007d0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000009c4
Arg [5] : 0000000000000000000000004da60510480ac2c6768893bc18abbbb7c141f58d


Deployed Bytecode Sourcemap

39835:5029:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;38411:10;:8;:10::i;:::-;39835:5029;;;;;40247:39;;;;;;;;;;-1:-1:-1;40247:39:0;;;;-1:-1:-1;;;;;40247:39:0;;;;;;-1:-1:-1;;;;;203:55:1;;;185:74;;173:2;158:18;40247:39:0;;;;;;;;40482:20;;;;;;;;;;-1:-1:-1;40482:20:0;;;;-1:-1:-1;;;;;40482:20:0;;;40511:39;;;;;;;;;;-1:-1:-1;40511:39:0;;;;-1:-1:-1;;;;;40511:39:0;;;39408:233;;;;;;;;;;;;;:::i;40097:30::-;;;;;;;;;;;;;;;40343:26;;;;;;;;;;;;;;;;;;;1163:25:1;;;1151:2;1136:18;40343:26:0;1017:177:1;38616:29:0;;;;;;;;;;-1:-1:-1;38616:29:0;;;;-1:-1:-1;;;;;38616:29:0;;;43887:187;;;;;;;;;;-1:-1:-1;43887:187:0;;;;;:::i;:::-;;:::i;40397:24::-;;;;;;;;;;;;;;;;38589:20;;;;;;;;;;-1:-1:-1;38589:20:0;;;;-1:-1:-1;;;;;38589:20:0;;;39251:149;;;;;;;;;;-1:-1:-1;39251:149:0;;;;;:::i;:::-;;:::i;43692:187::-;;;;;;;;;;-1:-1:-1;43692:187:0;;;;;:::i;:::-;;:::i;44082:203::-;;;;;;;;;;-1:-1:-1;44082:203:0;;;;;:::i;:::-;;:::i;44293:225::-;;;;;;;;;;-1:-1:-1;44293:225:0;;;;;:::i;:::-;;:::i;40187:43::-;;;;;;;;;;;;40228:2;40187:43;;40136:44;;;;;;;;;;;;40175:5;40136:44;;40293:23;;;;;;;;;;;;;;;;41654:2030;;;;;;;;;;-1:-1:-1;41654:2030:0;;;;;:::i;:::-;;:::i;44743:118::-;;;;;;;;;;-1:-1:-1;44743:118:0;;;;;:::i;:::-;;:::i;44526:209::-;;;;;;;;;;-1:-1:-1;44526:209:0;;;;;:::i;:::-;;:::i;38437:112::-;38503:9;38489:10;:23;38485:56;;38521:20;;-1:-1:-1;;;38521:20:0;;;;;;;;;;;38485:56;38437:112::o;39408:233::-;39474:14;;-1:-1:-1;;;;;39474:14:0;39460:10;:28;39456:55;;39497:14;;-1:-1:-1;;;39497:14:0;;;;;;;;;;;39456:55;39547:14;;;39540:5;;39527:35;;-1:-1:-1;;;;;39547:14:0;;;;39540:5;;;;39527:35;;;39581:14;;;;39573:22;;-1:-1:-1;;;;;;39573:22:0;;;-1:-1:-1;;;;;39581:14:0;;39573:22;;;;39606:27;;;39408:233::o;43887:187::-;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;43980:15:::1;:34:::0;;-1:-1:-1;;;;;;43980:34:0::1;-1:-1:-1::0;;;;;43980:34:0;::::1;::::0;;::::1;::::0;;;44030:36:::1;::::0;185:74:1;;;44030:36:0::1;::::0;173:2:1;158:18;44030:36:0::1;;;;;;;;43887:187:::0;:::o;39251:149::-;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;39328:14:::1;:27:::0;;-1:-1:-1;;;;;;39328:27:0::1;-1:-1:-1::0;;;;;39328:27:0;::::1;::::0;;::::1;::::0;;;39371:21:::1;::::0;::::1;::::0;-1:-1:-1;;39371:21:0::1;39251:149:::0;:::o;43692:187::-;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;43785:15:::1;:34:::0;;-1:-1:-1;;;;;;43785:34:0::1;-1:-1:-1::0;;;;;43785:34:0;::::1;::::0;;::::1;::::0;;;43835:36:::1;::::0;185:74:1;;;43835:36:0::1;::::0;173:2:1;158:18;43835:36:0::1;14:251:1::0;44082:203:0;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;40228:2:::1;44156:9;:26;44152:56;;;44191:17;;-1:-1:-1::0;;;44191:17:0::1;;;;;;;;;;;44152:56;44219:8;:20:::0;;;44255:22:::1;::::0;1163:25:1;;;44255:22:0::1;::::0;1151:2:1;1136:18;44255:22:0::1;1017:177:1::0;44293:225:0;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;40175:5:::1;44373:12;:27;44369:60;;;44409:20;;-1:-1:-1::0;;;44409:20:0::1;;;;;;;;;;;44369:60;44440:11;:26:::0;;;44482:28:::1;::::0;1163:25:1;;;44482:28:0::1;::::0;1151:2:1;1136:18;44482:28:0::1;1017:177:1::0;41654:2030:0;38200:6;;38210:1;38200:11;38192:34;;;;-1:-1:-1;;;38192:34:0;;3309:2:1;38192:34:0;;;3291:21:1;3348:2;3328:18;;;3321:30;3387:12;3367:18;;;3360:40;3417:18;;38192:34:0;;;;;;;;;38248:1;38239:10;;-1:-1:-1;;;;;41853:17:0;::::1;34303:42:::0;37058:52;;;41836:14:::1;::::0;41900:24:::1;::::0;:22:::1;:24::i;:::-;41883:41;;41948:15;41939:6;:24;41935:60;;;41972:23;;-1:-1:-1::0;;;41972:23:0::1;;;;;;;;;;;41935:60;42029:15;::::0;:37:::1;::::0;-1:-1:-1;;;42029:37:0;;-1:-1:-1;;;;;203:55:1;;;42029:37:0::1;::::0;::::1;185:74:1::0;42009:16:0::1;::::0;42029:15:::1;::::0;:31:::1;::::0;158:18:1;;42029:37:0::1;::::0;::::1;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;42006:60;;;42077:16;40175:5;42106:8;;42097:6;:17;;;;:::i;:::-;42096:34;;;;:::i;:::-;42153:15;::::0;42077:53;;-1:-1:-1;;;;;;42153:15:0::1;42145:38:::0;42141:205:::1;;42236:15;::::0;:33:::1;::::0;-1:-1:-1;;;42236:33:0;;-1:-1:-1;;;;;203:55:1;;;42236:33:0::1;::::0;::::1;185:74:1::0;42201:16:0::1;::::0;;;42236:15;::::1;::::0;:27:::1;::::0;158:18:1;;42236:33:0::1;::::0;::::1;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;42200:69:::0;;-1:-1:-1;42200:69:0;-1:-1:-1;42200:69:0;42308:16:::1;42200:69:::0;;42308:16:::1;:::i;:::-;42296:29;::::0;:8;:29:::1;:::i;:::-;42295:39;;;;:::i;:::-;42284:50;;42185:161;;42141:205;42356:11;-1:-1:-1::0;;;;;42370:22:0;::::1;::::0;:119:::1;;40175:5;42461:11;;40175:5;42446:26;;;;:::i;:::-;42434:39;::::0;:8;:39:::1;:::i;:::-;42433:56;;;;:::i;:::-;42370:119;;;42409:8;42370:119;42356:133:::0;-1:-1:-1;42519:15:0;42504:12:::1;42356:133:::0;42504:6;:12:::1;:::i;:::-;:30;42500:163;;;42627:24;42636:15:::0;42627:6;:24:::1;:::i;:::-;42621:30;;42500:163;-1:-1:-1::0;;;;;42677:22:0;::::1;::::0;42673:835:::1;;42716:20;40175:5;42746:9;;42740:3;:15;;;;:::i;:::-;42739:32;;;;:::i;:::-;42716:55;;42790:9;42786:362;;;42842:4;-1:-1:-1::0;;;;;42820:36:0::1;;42864:3;42820:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;42889:37:0::1;::::0;-1:-1:-1;;;;;;;42889:4:0::1;:13;::::0;-1:-1:-1;42903:8:0;;-1:-1:-1;42913:12:0;42889:13:::1;:37::i;:::-;42959:5;::::0;42945:42:::1;::::0;-1:-1:-1;;;;;42959:5:0;;::::1;::::0;42966:20:::1;::::0;:4:::1;:18;;:20::i;:::-;-1:-1:-1::0;;;;;42945:4:0::1;:13;::::0;:42;:13:::1;:42::i;:::-;42786:362;;;43028:41;-1:-1:-1::0;;;;;43028:17:0;::::1;43046:8:::0;43056:12;43028:17:::1;:41::i;:::-;43106:5;::::0;43088:44:::1;::::0;-1:-1:-1;;;;;43106:5:0::1;43113:18;43119:12:::0;43113:3;:18:::1;:::i;:::-;-1:-1:-1::0;;;;;43088:17:0;::::1;::::0;:44;:17:::1;:44::i;:::-;43167:66;43178:4:::0;43184:8;43194;43204:14:::1;43215:3:::0;43204:8;:14:::1;:::i;:::-;43167:66;::::0;;-1:-1:-1;;;;;5058:15:1;;;5040:34;;5110:15;;;5105:2;5090:18;;5083:43;5162:15;;;;5142:18;;;5135:43;5209:2;5194:18;;5187:34;;;;5252:3;5237:19;;5230:35;;;4966:3;4951:19;43167:66:0::1;;;;;;;42701:544;42673:835;;;43270:9;43266:231;;;43322:4;-1:-1:-1::0;;;;;43300:36:0::1;;43344:3;43300:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;43383:5:0::1;::::0;43369:42:::1;::::0;-1:-1:-1;;;;;;43383:5:0;;::::1;::::0;-1:-1:-1;43390:20:0::1;::::0;-1:-1:-1;43390:4:0::1;:18;;:20::i;43369:42::-;43266:231;;;43470:5;::::0;43452:29:::1;::::0;-1:-1:-1;;;;;43452:17:0;;::::1;::::0;43470:5:::1;43477:3:::0;43452:17:::1;:29::i;:::-;43522:9;43518:159;;;43548:49;43580:2:::0;43584:12:::1;43593:3:::0;43584:6;:12:::1;:::i;:::-;34303:42;::::0;43548:49;:31:::1;:49::i;:::-;43518:159;;;43630:35;43648:2:::0;43652:12:::1;43661:3:::0;43652:6;:12:::1;:::i;:::-;-1:-1:-1::0;;;;;43630:17:0;::::1;::::0;:35;:17:::1;:35::i;:::-;-1:-1:-1::0;;38285:1:0;38276:6;:10;-1:-1:-1;;;;;;;41654:2030:0:o;44743:118::-;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;44807:5:::1;:14:::0;;-1:-1:-1;;;;;;44807:14:0::1;-1:-1:-1::0;;;;;44807:14:0;::::1;::::0;;::::1;::::0;;;44837:16:::1;::::0;185:74:1;;;44837:16:0::1;::::0;173:2:1;158:18;44837:16:0::1;14:251:1::0;44526:209:0;39083:5;;-1:-1:-1;;;;;39083:5:0;39069:10;:19;39065:47;;39097:15;;-1:-1:-1;;;39097:15:0;;;;;;;;;;;39065:47;40175:5:::1;44602:10;:25;44598:56;;;44636:18;;-1:-1:-1::0;;;44636:18:0::1;;;;;;;;;;;44598:56;44665:9;:22:::0;;;44703:24:::1;::::0;1163:25:1;;;44703:24:0::1;::::0;1151:2:1;1136:18;44703:24:0::1;1017:177:1::0;36394:134:0;36459:7;36486:34;36496:8;36514:4;36486:9;:34::i;:::-;36479:41;36394:134;-1:-1:-1;;36394:134:0:o;35547:261::-;34303:42;-1:-1:-1;;;;;35636:17:0;;37058:52;35632:169;;35672:26;-1:-1:-1;;;;;35672:18:0;;35691:6;35672:18;:26::i;:::-;35547:261;;;:::o;35632:169::-;35731:58;-1:-1:-1;;;;;35731:46:0;;35778:2;35782:6;35731:46;:58::i;36536:265::-;36612:7;34303:42;-1:-1:-1;;;;;36636:17:0;;37058:52;36632:162;;-1:-1:-1;;;;;;36679:13:0;;;36672:20;;36632:162;36732:50;;-1:-1:-1;;;36732:50:0;;-1:-1:-1;;;;;203:55:1;;;36732:50:0;;;185:74:1;36732:43:0;;;;;158:18:1;;36732:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;36725:57;36536:265;-1:-1:-1;;;36536:265:0:o;28497:349::-;28570:12;28774:1;28771;28768;28765;28757:6;28753:2;28746:5;28741:35;28730:46;;28807:7;28799:39;;;;-1:-1:-1;;;28799:39:0;;5667:2:1;28799:39:0;;;5649:21:1;5706:2;5686:18;;;5679:30;5745:21;5725:18;;;5718:49;5784:18;;28799:39:0;5465:343:1;15646:162:0;15756:43;;;-1:-1:-1;;;;;6005:55:1;;;15756:43:0;;;5987:74:1;6077:18;;;;6070:34;;;15756:43:0;;;;;;;;;;5960:18:1;;;;15756:43:0;;;;;;;;;;-1:-1:-1;;;15756:43:0;;;15729:71;;15749:5;;15756:43;-1:-1:-1;;19561:33:0;;15771:14;;15756:43;19561:27;:33::i;:::-;19535:59;;19609:10;:17;19630:1;19609:22;;:57;;;;;19647:10;19636:30;;;;;;;;;;;;:::i;:::-;19635:31;19609:57;19605:137;;;19690:40;;-1:-1:-1;;;19690:40:0;;-1:-1:-1;;;;;203:55:1;;19690:40:0;;;185:74:1;158:18;;19690:40:0;14:251:1;7777:168:0;7852:12;7884:53;7906:6;7914:4;7920:1;7923:13;7884:21;:53::i;13917:82::-;13974:17;;-1:-1:-1;;;13974:17:0;;;;;;;;;;;9436:494;9617:12;9670:5;9646:21;:29;9642:110;;;9699:41;;-1:-1:-1;;;9699:41:0;;9734:4;9699:41;;;185:74:1;158:18;;9699:41:0;14:251:1;9642:110:0;9763:12;9777:23;9804:6;-1:-1:-1;;;;;9804:11:0;9823:5;9830:4;9804:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9762:73;;;;9853:69;9880:6;9888:7;9897:10;9909:12;9853:26;:69::i;:::-;9846:76;;;;9436:494;;;;;;;:::o;12027:710::-;12223:12;12252:7;12248:482;;;12280:10;:17;12301:1;12280:22;12276:345;;12507:6;-1:-1:-1;;;;;12507:18:0;;12529:1;12507:23;12503:103;;12562:24;;-1:-1:-1;;;12562:24:0;;-1:-1:-1;;;;;203:55:1;;12562:24:0;;;185:74:1;158:18;;12562:24:0;14:251:1;12503:103:0;-1:-1:-1;12642:10:0;12635:17;;12248:482;12685:33;12693:10;12705:12;14179:17;;:21;14175:421;;14411:10;14405:17;14468:15;14455:10;14451:2;14447:19;14440:44;14175:421;14531:14;:12;:14;;:::i;1199:172:1:-;-1:-1:-1;;;;;1296:5:1;1292:54;1285:5;1282:65;1272:93;;1361:1;1358;1351:12;1272:93;1199:172;:::o;1376:290::-;1460:6;1513:2;1501:9;1492:7;1488:23;1484:32;1481:52;;;1529:1;1526;1519:12;1481:52;1568:9;1555:23;1587:49;1630:5;1587:49;:::i;2236:180::-;2295:6;2348:2;2336:9;2327:7;2323:23;2319:32;2316:52;;;2364:1;2361;2354:12;2316:52;-1:-1:-1;2387:23:1;;2236:180;-1:-1:-1;2236:180:1:o;2421:681::-;2536:6;2544;2552;2560;2613:3;2601:9;2592:7;2588:23;2584:33;2581:53;;;2630:1;2627;2620:12;2581:53;2669:9;2656:23;2688:49;2731:5;2688:49;:::i;:::-;2756:5;-1:-1:-1;2808:2:1;2793:18;;2780:32;;-1:-1:-1;2864:2:1;2849:18;;2836:32;2877:51;2836:32;2877:51;:::i;:::-;2947:7;-1:-1:-1;3006:2:1;2991:18;;2978:32;3019:51;2978:32;3019:51;:::i;:::-;2421:681;;;;-1:-1:-1;2421:681:1;;-1:-1:-1;;2421:681:1:o;3446:330::-;3525:6;3533;3586:2;3574:9;3565:7;3561:23;3557:32;3554:52;;;3602:1;3599;3592:12;3554:52;3631:9;3625:16;3615:26;;3684:2;3673:9;3669:18;3663:25;3697:49;3740:5;3697:49;:::i;:::-;3765:5;3755:15;;;3446:330;;;;;:::o;3781:127::-;3842:10;3837:3;3833:20;3830:1;3823:31;3873:4;3870:1;3863:15;3897:4;3894:1;3887:15;3913:168;3986:9;;;4017;;4034:15;;;4028:22;;4014:37;4004:71;;4055:18;;:::i;4086:217::-;4126:1;4152;4142:132;;4196:10;4191:3;4187:20;4184:1;4177:31;4231:4;4228:1;4221:15;4259:4;4256:1;4249:15;4142:132;-1:-1:-1;4288:9:1;;4086:217::o;4308:245::-;4387:6;4395;4448:2;4436:9;4427:7;4423:23;4419:32;4416:52;;;4464:1;4461;4454:12;4416:52;-1:-1:-1;;4487:16:1;;4543:2;4528:18;;;4522:25;4487:16;;4522:25;;-1:-1:-1;4308:245:1:o;4558:128::-;4625:9;;;4646:11;;;4643:37;;;4660:18;;:::i;5276:184::-;5346:6;5399:2;5387:9;5378:7;5374:23;5370:32;5367:52;;;5415:1;5412;5405:12;5367:52;-1:-1:-1;5438:16:1;;5276:184;-1:-1:-1;5276:184:1:o;6115:277::-;6182:6;6235:2;6223:9;6214:7;6210:23;6206:32;6203:52;;;6251:1;6248;6241:12;6203:52;6283:9;6277:16;6336:5;6329:13;6322:21;6315:5;6312:32;6302:60;;6358:1;6355;6348:12;6397:412;6526:3;6564:6;6558:13;6589:1;6599:129;6613:6;6610:1;6607:13;6599:129;;;6711:4;6695:14;;;6691:25;;6685:32;6672:11;;;6665:53;6628:12;6599:129;;;-1:-1:-1;6783:1:1;6747:16;;6772:13;;;-1:-1:-1;6747:16:1;6397:412;-1:-1:-1;6397:412:1:o

Swarm Source

ipfs://78e6bb7188d78939bf3ff938cb548280fb791e6139cbada596b95b233896246a

Block Transaction Gas Used Reward
view all blocks collator

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

Validator Index Block Amount
View All Withdrawals

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

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.