ETH Price: $2,090.31 (+0.32%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim228096672025-06-29 11:04:23224 days ago1751195063IN
0x3D095553...Df340c6a5
0 ETH0.000101192.32044187
Claim228074612025-06-29 3:39:11225 days ago1751168351IN
0x3D095553...Df340c6a5
0 ETH0.000017370.39834452
Claim227813662025-06-25 12:11:23228 days ago1750853483IN
0x3D095553...Df340c6a5
0 ETH0.000294876.76137048
Claim220073242025-03-09 5:48:23336 days ago1741499303IN
0x3D095553...Df340c6a5
0 ETH0.000044371.0177559
Claim219719282025-03-04 7:07:23341 days ago1741072043IN
0x3D095553...Df340c6a5
0 ETH0.00004570.75274954
Claim219707912025-03-04 3:18:35342 days ago1741058315IN
0x3D095553...Df340c6a5
0 ETH0.000092042.11052801
Claim219707472025-03-04 3:09:47342 days ago1741057787IN
0x3D095553...Df340c6a5
0 ETH0.000111312.55253004
Claim219666282025-03-03 13:22:59342 days ago1741008179IN
0x3D095553...Df340c6a5
0 ETH0.000049691.13947659
Claim209684572024-10-15 4:03:59482 days ago1728965039IN
0x3D095553...Df340c6a5
0 ETH0.0007309112.03931198
Set Allowlist So...209477262024-10-12 6:25:59484 days ago1728714359IN
0x3D095553...Df340c6a5
0 ETH0.000376838.0610282
Claim204560652024-08-04 15:23:47553 days ago1722785027IN
0x3D095553...Df340c6a5
0 ETH0.000582069.58742056
Claim203765052024-07-24 12:48:47564 days ago1721825327IN
0x3D095553...Df340c6a5
0 ETH0.000198613.27144087
Claim203635682024-07-22 17:29:47566 days ago1721669387IN
0x3D095553...Df340c6a5
0 ETH0.000303555
Claim203591832024-07-22 2:47:11567 days ago1721616431IN
0x3D095553...Df340c6a5
0 ETH0.000560919.23911611
Claim203573242024-07-21 20:33:35567 days ago1721594015IN
0x3D095553...Df340c6a5
0 ETH0.0014238123.45227967
Claim203553252024-07-21 13:50:59567 days ago1721569859IN
0x3D095553...Df340c6a5
0 ETH0.000165712.72959437
Claim203553242024-07-21 13:50:47567 days ago1721569847IN
0x3D095553...Df340c6a5
0 ETH0.000132932.18967479
Claim203553142024-07-21 13:48:47567 days ago1721569727IN
0x3D095553...Df340c6a5
0 ETH0.000168592.77708901
Claim203552752024-07-21 13:40:59567 days ago1721569259IN
0x3D095553...Df340c6a5
0 ETH0.000166942.74981005
Claim203550352024-07-21 12:52:35567 days ago1721566355IN
0x3D095553...Df340c6a5
0 ETH0.000132572.18375151
Claim203548742024-07-21 12:20:23567 days ago1721564423IN
0x3D095553...Df340c6a5
0 ETH0.000132062.1753108
Claim203548662024-07-21 12:18:47567 days ago1721564327IN
0x3D095553...Df340c6a5
0 ETH0.000145832.40216949
Claim203548242024-07-21 12:10:23567 days ago1721563823IN
0x3D095553...Df340c6a5
0 ETH0.000145662.39939066

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DistributorReceiver

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.19;

import {CCIPReceiver} from "@chainlink/contracts-ccip/src/v0.8/ccip/applications/CCIPReceiver.sol";
import {IRouterClient} from "@chainlink/contracts-ccip/src/v0.8/ccip/interfaces/IRouterClient.sol";
import {Client} from "@chainlink/contracts-ccip/src/v0.8/ccip/libraries/Client.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./interfaces/IFactory.sol";

/// @title Distributor
/// @author DeFiGeek Community Japan
/// @notice Distributes early user rewards
/// @dev Requires reward funds to be sent to this contract
contract DistributorReceiver is Ownable, CCIPReceiver {
    using SafeERC20 for IERC20;

    IFactory public factory;
    IERC20 public token;
    mapping(address => uint256) public scores;

    // Mapping to keep track of allowlisted source chains.
    mapping(uint64 => mapping(address => bool))
        public allowlistedSourceChainSenders;

    /// @notice Records reward score parameters
    /// @dev This event is emitted when a user is rewarded
    /// @param scorerAddress The auction address which requests to add the score
    /// @param userAddress The address of the user who is get rewarded
    /// @param scoreAdded The amount of the score added
    event ScoreAdded(
        address indexed scorerAddress,
        address indexed userAddress,
        uint256 scoreAdded
    );

    /// @notice Records claim parameters
    /// @dev This event is emitted when a user claims
    /// @param userAddress The address of the user who claimed
    /// @param amount The amount of the token claimed
    event Claimed(address indexed userAddress, uint256 amount);

    // Used when the source chain has not been allowlisted by the contract owner.
    error SourceChainSenderNotAllowlisted(
        uint64 sourceChainSelector,
        address sender
    );

    constructor(
        address factory_,
        address token_,
        address router_
    ) CCIPReceiver(router_) {
        factory = IFactory(factory_);
        token = IERC20(token_);
    }

    /// @dev Modifier that checks if the chain with the given sourceChainSelector is allowlisted.
    /// @param _sourceChainSelector The selector of the destination chain.
    modifier onlyAllowlisted(uint64 _sourceChainSelector, address _sender) {
        if (!allowlistedSourceChainSenders[_sourceChainSelector][_sender]) {
            revert SourceChainSenderNotAllowlisted(
                _sourceChainSelector,
                _sender
            );
        }
        _;
    }

    function setAllowlistSourceChainSender(
        uint64 _sourceChainSelector,
        address _sender,
        bool allowed
    ) external onlyOwner {
        allowlistedSourceChainSenders[_sourceChainSelector][_sender] = allowed;
    }

    /// @dev Allow only scorers who is registered in Factory
    modifier onlyAuction() {
        require(factory.auctions(msg.sender), "You are not the auction.");
        _;
    }

    /// @notice Add a specified amount to the score of a specified user
    /// @dev Expected to be called from auction contracts
    /// @param target_ The address of the user who is rewarded
    /// @param amount_ The amount of the score to be added
    function addScore(address target_, uint256 amount_) external onlyAuction {
        _addScore(target_, amount_);
    }

    /// @notice Add a specified amount to the score of a specified user
    function rescueScore(address target_, uint256 amount_) external onlyOwner {
        _addScore(target_, amount_);
    }

    function _ccipReceive(
        Client.Any2EVMMessage memory message
    )
        internal
        override
        onlyAllowlisted(
            message.sourceChainSelector,
            abi.decode(message.sender, (address))
        )
    {
        (address target, uint256 amount, bool isClaim) = abi.decode(
            message.data,
            (address, uint256, bool)
        );

        _addScore(target, amount);

        if (isClaim) {
            _claim(target);
        }
    }

    /// @notice Add a specified amount to the score of a specified user
    /// @dev Expected to be called from auction contracts
    /// @param target_ The address of the user who is rewarded
    /// @param amount_ The amount of the score to be added
    function _addScore(address target_, uint256 amount_) internal {
        scores[target_] += amount_;
        emit ScoreAdded(msg.sender, target_, amount_);
    }

    /// @notice Claim early user rewards
    /// @dev Epected to be called from rewarded users
    /// @param target_ The address of the user who is rewarded
    function claim(address target_) external {
        _claim(target_);
    }

    /// @notice Claim early user rewards
    /// @dev Epected to be called from rewarded users
    /// @param target_ The address of the user who is rewarded
    function _claim(address target_) internal {
        uint256 _score = scores[target_];
        require(_score > 0, "Not eligible to get rewarded");

        uint256 _balance = token.balanceOf(address(this));

        if (_balance < _score) {
            _score = _balance;
        }

        scores[target_] -= _score;
        token.safeTransfer(target_, _score);
        emit Claimed(target_, _score);
    }

    function withdrawToken(
        address token_,
        address target_,
        uint256 amount_
    ) external onlyOwner {
        IERC20(token_).safeTransfer(target_, amount_);
    }
}

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

import {IAny2EVMMessageReceiver} from "../interfaces/IAny2EVMMessageReceiver.sol";

import {Client} from "../libraries/Client.sol";

import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/utils/introspection/IERC165.sol";

/// @title CCIPReceiver - Base contract for CCIP applications that can receive messages.
abstract contract CCIPReceiver is IAny2EVMMessageReceiver, IERC165 {
  address internal immutable i_ccipRouter;

  constructor(address router) {
    if (router == address(0)) revert InvalidRouter(address(0));
    i_ccipRouter = router;
  }

  /// @notice IERC165 supports an interfaceId
  /// @param interfaceId The interfaceId to check
  /// @return true if the interfaceId is supported
  /// @dev Should indicate whether the contract implements IAny2EVMMessageReceiver
  /// e.g. return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId
  /// This allows CCIP to check if ccipReceive is available before calling it.
  /// If this returns false or reverts, only tokens are transferred to the receiver.
  /// If this returns true, tokens are transferred and ccipReceive is called atomically.
  /// Additionally, if the receiver address does not have code associated with
  /// it at the time of execution (EXTCODESIZE returns 0), only tokens will be transferred.
  function supportsInterface(bytes4 interfaceId) public pure virtual override returns (bool) {
    return interfaceId == type(IAny2EVMMessageReceiver).interfaceId || interfaceId == type(IERC165).interfaceId;
  }

  /// @inheritdoc IAny2EVMMessageReceiver
  function ccipReceive(Client.Any2EVMMessage calldata message) external virtual override onlyRouter {
    _ccipReceive(message);
  }

  /// @notice Override this function in your implementation.
  /// @param message Any2EVMMessage
  function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual;

  /////////////////////////////////////////////////////////////////////
  // Plumbing
  /////////////////////////////////////////////////////////////////////

  /// @notice Return the current router
  /// @return CCIP router address
  function getRouter() public view returns (address) {
    return address(i_ccipRouter);
  }

  error InvalidRouter(address router);

  /// @dev only calls from the set router are accepted.
  modifier onlyRouter() {
    if (msg.sender != address(i_ccipRouter)) revert InvalidRouter(msg.sender);
    _;
  }
}

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

import {Client} from "../libraries/Client.sol";

/// @notice Application contracts that intend to receive messages from
/// the router should implement this interface.
interface IAny2EVMMessageReceiver {
  /// @notice Called by the Router to deliver a message.
  /// If this reverts, any token transfers also revert. The message
  /// will move to a FAILED state and become available for manual execution.
  /// @param message CCIP Message
  /// @dev Note ensure you check the msg.sender is the OffRampRouter
  function ccipReceive(Client.Any2EVMMessage calldata message) external;
}

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

import {Client} from "../libraries/Client.sol";

interface IRouterClient {
  error UnsupportedDestinationChain(uint64 destChainSelector);
  error InsufficientFeeTokenAmount();
  error InvalidMsgValue();

  /// @notice Checks if the given chain ID is supported for sending/receiving.
  /// @param chainSelector The chain to check.
  /// @return supported is true if it is supported, false if not.
  function isChainSupported(uint64 chainSelector) external view returns (bool supported);

  /// @notice Gets a list of all supported tokens which can be sent or received
  /// to/from a given chain id.
  /// @param chainSelector The chainSelector.
  /// @return tokens The addresses of all tokens that are supported.
  function getSupportedTokens(uint64 chainSelector) external view returns (address[] memory tokens);

  /// @param destinationChainSelector The destination chainSelector
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return fee returns execution fee for the message
  /// delivery to destination chain, denominated in the feeToken specified in the message.
  /// @dev Reverts with appropriate reason upon invalid message.
  function getFee(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage memory message
  ) external view returns (uint256 fee);

  /// @notice Request a message to be sent to the destination chain
  /// @param destinationChainSelector The destination chain ID
  /// @param message The cross-chain CCIP message including data and/or tokens
  /// @return messageId The message ID
  /// @dev Note if msg.value is larger than the required fee (from getFee) we accept
  /// the overpayment with no refund.
  /// @dev Reverts with appropriate reason upon invalid message.
  function ccipSend(
    uint64 destinationChainSelector,
    Client.EVM2AnyMessage calldata message
  ) external payable returns (bytes32);
}

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

// End consumer library.
library Client {
  /// @dev RMN depends on this struct, if changing, please notify the RMN maintainers.
  struct EVMTokenAmount {
    address token; // token address on the local chain.
    uint256 amount; // Amount of tokens.
  }

  struct Any2EVMMessage {
    bytes32 messageId; // MessageId corresponding to ccipSend on source.
    uint64 sourceChainSelector; // Source chain selector.
    bytes sender; // abi.decode(sender) if coming from an EVM chain.
    bytes data; // payload sent in original message.
    EVMTokenAmount[] destTokenAmounts; // Tokens and their amounts in their destination chain representation.
  }

  // If extraArgs is empty bytes, the default is 200k gas limit.
  struct EVM2AnyMessage {
    bytes receiver; // abi.encode(receiver address) for dest EVM chains
    bytes data; // Data payload
    EVMTokenAmount[] tokenAmounts; // Token transfers
    address feeToken; // Address of feeToken. address(0) means you will send msg.value.
    bytes extraArgs; // Populate this with _argsToBytes(EVMExtraArgsV1)
  }

  // bytes4(keccak256("CCIP EVMExtraArgsV1"));
  bytes4 public constant EVM_EXTRA_ARGS_V1_TAG = 0x97a657c9;
  struct EVMExtraArgsV1 {
    uint256 gasLimit;
  }

  function _argsToBytes(EVMExtraArgsV1 memory extraArgs) internal pure returns (bytes memory bts) {
    return abi.encodeWithSelector(EVM_EXTRA_ARGS_V1_TAG, extraArgs);
  }
}

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
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].
     *
     * CAUTION: See Security Considerations above.
     */
    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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @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.encodeWithSelector(token.transfer.selector, 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.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

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

    /**
     * @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);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

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

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, 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);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * 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.isContract(address(token));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://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 {
        require(address(this).balance >= amount, "Address: insufficient balance");

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

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

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

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

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

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

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

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

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

    /**
     * @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 one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

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

// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.19;

interface IFactory {
    function auctions(address _address) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"factory_","type":"address"},{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"router_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"router","type":"address"}],"name":"InvalidRouter","type":"error"},{"inputs":[{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"address","name":"sender","type":"address"}],"name":"SourceChainSenderNotAllowlisted","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"scorerAddress","type":"address"},{"indexed":true,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"scoreAdded","type":"uint256"}],"name":"ScoreAdded","type":"event"},{"inputs":[{"internalType":"address","name":"target_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"addScore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"address","name":"","type":"address"}],"name":"allowlistedSourceChainSenders","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"messageId","type":"bytes32"},{"internalType":"uint64","name":"sourceChainSelector","type":"uint64"},{"internalType":"bytes","name":"sender","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Client.EVMTokenAmount[]","name":"destTokenAmounts","type":"tuple[]"}],"internalType":"struct Client.Any2EVMMessage","name":"message","type":"tuple"}],"name":"ccipReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"contract IFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRouter","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"rescueScore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"scores","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_sourceChainSelector","type":"uint64"},{"internalType":"address","name":"_sender","type":"address"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setAllowlistSourceChainSender","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"address","name":"target_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b506040516200161b3803806200161b83398101604081905262000034916200011a565b806200004033620000ad565b6001600160a01b0381166200006f576040516335fdcccd60e21b81526000600482015260240160405180910390fd5b6001600160a01b03908116608052600180549482166001600160a01b0319958616179055600280549390911692909316919091179091555062000164565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200011557600080fd5b919050565b6000806000606084860312156200013057600080fd5b6200013b84620000fd565b92506200014b60208501620000fd565b91506200015b60408501620000fd565b90509250925092565b60805161149462000187600039600081816101fa015261043b01526114946000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c806385572ffb11610097578063d119db4c11610066578063d119db4c1461023e578063f2fde38b14610251578063fc0c546a14610264578063fef4b48d1461028457600080fd5b806385572ffb146101a65780638da5cb5b146101b9578063b0f479a1146101f8578063c45a01551461021e57600080fd5b806333d6a16f116100d357806333d6a16f1461014a5780634128ded21461015d578063715018a61461017057806376dd110f1461017857600080fd5b806301e33667146100fa57806301ffc9a71461010f5780631e83409a14610137575b600080fd5b61010d610108366004610e82565b6102b2565b005b61012261011d366004610ec3565b6102e0565b60405190151581526020015b60405180910390f35b61010d610145366004610f0c565b610379565b61010d610158366004610f29565b610385565b61010d61016b366004610f80565b61039b565b61010d61040f565b610198610186366004610f0c565b60036020526000908152604090205481565b60405190815260200161012e565b61010d6101b4366004610fc9565b610423565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012e565b7f00000000000000000000000000000000000000000000000000000000000000006101d3565b6001546101d39073ffffffffffffffffffffffffffffffffffffffff1681565b61010d61024c366004610f29565b6104aa565b61010d61025f366004610f0c565b6105a2565b6002546101d39073ffffffffffffffffffffffffffffffffffffffff1681565b610122610292366004611004565b600460209081526000928352604080842090915290825290205460ff1681565b6102ba610656565b6102db73ffffffffffffffffffffffffffffffffffffffff841683836106d7565b505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f85572ffb00000000000000000000000000000000000000000000000000000000148061037357507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b61038281610764565b50565b61038d610656565b6103978282610945565b5050565b6103a3610656565b67ffffffffffffffff909216600090815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff90941683529290522080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179055565b610417610656565b61042160006109d0565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610499576040517fd7f733340000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6103826104a582611240565b610a45565b6001546040517f1d59410a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911690631d59410a90602401602060405180830381865afa158015610518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053c91906112ed565b61038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f596f7520617265206e6f74207468652061756374696f6e2e00000000000000006044820152606401610490565b6105aa610656565b73ffffffffffffffffffffffffffffffffffffffff811661064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610490565b610382816109d0565b60005473ffffffffffffffffffffffffffffffffffffffff163314610421576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610490565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526102db908490610b42565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260036020526040902054806107f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f7420656c696769626c6520746f20676574207265776172646564000000006044820152606401610490565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610884919061130a565b905081811015610892578091505b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040812080548492906108c7908490611352565b90915550506002546108f09073ffffffffffffffffffffffffffffffffffffffff1684846106d7565b8273ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8360405161093891815260200190565b60405180910390a2505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805483929061097a908490611365565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff83169033907f52e22cc174e4699db04317deda4b98eb75396baa99b966ad8377e0ed246979019060200160405180910390a35050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80602001518160400151806020019051810190610a629190611378565b67ffffffffffffffff8216600090815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610afe576040517f4e7cdce800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8316600482015273ffffffffffffffffffffffffffffffffffffffff82166024820152604401610490565b60008060008560600151806020019051810190610b1b9190611395565b925092509250610b2b8383610945565b8015610b3a57610b3a83610764565b505050505050565b6000610ba4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610c519092919063ffffffff16565b9050805160001480610bc5575080806020019051810190610bc591906112ed565b6102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610490565b6060610c608484600085610c68565b949350505050565b606082471015610cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610490565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610d2391906113f1565b60006040518083038185875af1925050503d8060008114610d60576040519150601f19603f3d011682016040523d82523d6000602084013e610d65565b606091505b5091509150610d7687838387610d81565b979650505050505050565b60608315610e17578251600003610e105773ffffffffffffffffffffffffffffffffffffffff85163b610e10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610490565b5081610c60565b610c608383815115610e2c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610490919061140d565b73ffffffffffffffffffffffffffffffffffffffff8116811461038257600080fd5b600080600060608486031215610e9757600080fd5b8335610ea281610e60565b92506020840135610eb281610e60565b929592945050506040919091013590565b600060208284031215610ed557600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f0557600080fd5b9392505050565b600060208284031215610f1e57600080fd5b8135610f0581610e60565b60008060408385031215610f3c57600080fd5b8235610f4781610e60565b946020939093013593505050565b803567ffffffffffffffff81168114610f6d57600080fd5b919050565b801515811461038257600080fd5b600080600060608486031215610f9557600080fd5b610f9e84610f55565b92506020840135610fae81610e60565b91506040840135610fbe81610f72565b809150509250925092565b600060208284031215610fdb57600080fd5b813567ffffffffffffffff811115610ff257600080fd5b820160a08185031215610f0557600080fd5b6000806040838503121561101757600080fd5b61102083610f55565b9150602083013561103081610e60565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561108d5761108d61103b565b60405290565b60405160a0810167ffffffffffffffff8111828210171561108d5761108d61103b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156110fd576110fd61103b565b604052919050565b600082601f83011261111657600080fd5b813567ffffffffffffffff8111156111305761113061103b565b61116160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016110b6565b81815284602083860101111561117657600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126111a457600080fd5b8135602067ffffffffffffffff8211156111c0576111c061103b565b6111ce818360051b016110b6565b82815260069290921b840181019181810190868411156111ed57600080fd5b8286015b84811015611235576040818903121561120a5760008081fd5b61121261106a565b813561121d81610e60565b815281850135858201528352918301916040016111f1565b509695505050505050565b600060a0823603121561125257600080fd5b61125a611093565b8235815261126a60208401610f55565b6020820152604083013567ffffffffffffffff8082111561128a57600080fd5b61129636838701611105565b604084015260608501359150808211156112af57600080fd5b6112bb36838701611105565b606084015260808501359150808211156112d457600080fd5b506112e136828601611193565b60808301525092915050565b6000602082840312156112ff57600080fd5b8151610f0581610f72565b60006020828403121561131c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561037357610373611323565b8082018082111561037357610373611323565b60006020828403121561138a57600080fd5b8151610f0581610e60565b6000806000606084860312156113aa57600080fd5b83516113b581610e60565b602085015160408601519194509250610fbe81610f72565b60005b838110156113e85781810151838201526020016113d0565b50506000910152565b600082516114038184602087016113cd565b9190910192915050565b602081526000825180602084015261142c8160408501602087016113cd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220cb597c57b447afd213c7701e6c749f5141463c84b6f81144db4501ae8b52260664736f6c634300081300330000000000000000000000003ee0952314739e2c4270f0ece989cf73f589124300000000000000000000000015dac05c93e1c5f31a29547340997ba9f6ec4f8700000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806385572ffb11610097578063d119db4c11610066578063d119db4c1461023e578063f2fde38b14610251578063fc0c546a14610264578063fef4b48d1461028457600080fd5b806385572ffb146101a65780638da5cb5b146101b9578063b0f479a1146101f8578063c45a01551461021e57600080fd5b806333d6a16f116100d357806333d6a16f1461014a5780634128ded21461015d578063715018a61461017057806376dd110f1461017857600080fd5b806301e33667146100fa57806301ffc9a71461010f5780631e83409a14610137575b600080fd5b61010d610108366004610e82565b6102b2565b005b61012261011d366004610ec3565b6102e0565b60405190151581526020015b60405180910390f35b61010d610145366004610f0c565b610379565b61010d610158366004610f29565b610385565b61010d61016b366004610f80565b61039b565b61010d61040f565b610198610186366004610f0c565b60036020526000908152604090205481565b60405190815260200161012e565b61010d6101b4366004610fc9565b610423565b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012e565b7f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d6101d3565b6001546101d39073ffffffffffffffffffffffffffffffffffffffff1681565b61010d61024c366004610f29565b6104aa565b61010d61025f366004610f0c565b6105a2565b6002546101d39073ffffffffffffffffffffffffffffffffffffffff1681565b610122610292366004611004565b600460209081526000928352604080842090915290825290205460ff1681565b6102ba610656565b6102db73ffffffffffffffffffffffffffffffffffffffff841683836106d7565b505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f85572ffb00000000000000000000000000000000000000000000000000000000148061037357507fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000145b92915050565b61038281610764565b50565b61038d610656565b6103978282610945565b5050565b6103a3610656565b67ffffffffffffffff909216600090815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff90941683529290522080549115157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909216919091179055565b610417610656565b61042160006109d0565b565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d1614610499576040517fd7f733340000000000000000000000000000000000000000000000000000000081523360048201526024015b60405180910390fd5b6103826104a582611240565b610a45565b6001546040517f1d59410a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff90911690631d59410a90602401602060405180830381865afa158015610518573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061053c91906112ed565b61038d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f596f7520617265206e6f74207468652061756374696f6e2e00000000000000006044820152606401610490565b6105aa610656565b73ffffffffffffffffffffffffffffffffffffffff811661064d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610490565b610382816109d0565b60005473ffffffffffffffffffffffffffffffffffffffff163314610421576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610490565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526102db908490610b42565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260036020526040902054806107f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601c60248201527f4e6f7420656c696769626c6520746f20676574207265776172646564000000006044820152606401610490565b6002546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015610860573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610884919061130a565b905081811015610892578091505b73ffffffffffffffffffffffffffffffffffffffff8316600090815260036020526040812080548492906108c7908490611352565b90915550506002546108f09073ffffffffffffffffffffffffffffffffffffffff1684846106d7565b8273ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8360405161093891815260200190565b60405180910390a2505050565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600360205260408120805483929061097a908490611365565b909155505060405181815273ffffffffffffffffffffffffffffffffffffffff83169033907f52e22cc174e4699db04317deda4b98eb75396baa99b966ad8377e0ed246979019060200160405180910390a35050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80602001518160400151806020019051810190610a629190611378565b67ffffffffffffffff8216600090815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205460ff16610afe576040517f4e7cdce800000000000000000000000000000000000000000000000000000000815267ffffffffffffffff8316600482015273ffffffffffffffffffffffffffffffffffffffff82166024820152604401610490565b60008060008560600151806020019051810190610b1b9190611395565b925092509250610b2b8383610945565b8015610b3a57610b3a83610764565b505050505050565b6000610ba4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610c519092919063ffffffff16565b9050805160001480610bc5575080806020019051810190610bc591906112ed565b6102db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610490565b6060610c608484600085610c68565b949350505050565b606082471015610cfa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610490565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610d2391906113f1565b60006040518083038185875af1925050503d8060008114610d60576040519150601f19603f3d011682016040523d82523d6000602084013e610d65565b606091505b5091509150610d7687838387610d81565b979650505050505050565b60608315610e17578251600003610e105773ffffffffffffffffffffffffffffffffffffffff85163b610e10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610490565b5081610c60565b610c608383815115610e2c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610490919061140d565b73ffffffffffffffffffffffffffffffffffffffff8116811461038257600080fd5b600080600060608486031215610e9757600080fd5b8335610ea281610e60565b92506020840135610eb281610e60565b929592945050506040919091013590565b600060208284031215610ed557600080fd5b81357fffffffff0000000000000000000000000000000000000000000000000000000081168114610f0557600080fd5b9392505050565b600060208284031215610f1e57600080fd5b8135610f0581610e60565b60008060408385031215610f3c57600080fd5b8235610f4781610e60565b946020939093013593505050565b803567ffffffffffffffff81168114610f6d57600080fd5b919050565b801515811461038257600080fd5b600080600060608486031215610f9557600080fd5b610f9e84610f55565b92506020840135610fae81610e60565b91506040840135610fbe81610f72565b809150509250925092565b600060208284031215610fdb57600080fd5b813567ffffffffffffffff811115610ff257600080fd5b820160a08185031215610f0557600080fd5b6000806040838503121561101757600080fd5b61102083610f55565b9150602083013561103081610e60565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561108d5761108d61103b565b60405290565b60405160a0810167ffffffffffffffff8111828210171561108d5761108d61103b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156110fd576110fd61103b565b604052919050565b600082601f83011261111657600080fd5b813567ffffffffffffffff8111156111305761113061103b565b61116160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116016110b6565b81815284602083860101111561117657600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126111a457600080fd5b8135602067ffffffffffffffff8211156111c0576111c061103b565b6111ce818360051b016110b6565b82815260069290921b840181019181810190868411156111ed57600080fd5b8286015b84811015611235576040818903121561120a5760008081fd5b61121261106a565b813561121d81610e60565b815281850135858201528352918301916040016111f1565b509695505050505050565b600060a0823603121561125257600080fd5b61125a611093565b8235815261126a60208401610f55565b6020820152604083013567ffffffffffffffff8082111561128a57600080fd5b61129636838701611105565b604084015260608501359150808211156112af57600080fd5b6112bb36838701611105565b606084015260808501359150808211156112d457600080fd5b506112e136828601611193565b60808301525092915050565b6000602082840312156112ff57600080fd5b8151610f0581610f72565b60006020828403121561131c57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561037357610373611323565b8082018082111561037357610373611323565b60006020828403121561138a57600080fd5b8151610f0581610e60565b6000806000606084860312156113aa57600080fd5b83516113b581610e60565b602085015160408601519194509250610fbe81610f72565b60005b838110156113e85781810151838201526020016113d0565b50506000910152565b600082516114038184602087016113cd565b9190910192915050565b602081526000825180602084015261142c8160408501602087016113cd565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea2646970667358221220cb597c57b447afd213c7701e6c749f5141463c84b6f81144db4501ae8b52260664736f6c63430008130033

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

0000000000000000000000003ee0952314739e2c4270f0ece989cf73f589124300000000000000000000000015dac05c93e1c5f31a29547340997ba9f6ec4f8700000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d

-----Decoded View---------------
Arg [0] : factory_ (address): 0x3Ee0952314739e2c4270F0ecE989cf73F5891243
Arg [1] : token_ (address): 0x15Dac05C93e1c5F31a29547340997BA9f6ec4F87
Arg [2] : router_ (address): 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000003ee0952314739e2c4270f0ece989cf73f5891243
Arg [1] : 00000000000000000000000015dac05c93e1c5f31a29547340997ba9f6ec4f87
Arg [2] : 00000000000000000000000080226fc0ee2b096224eeac085bb9a8cba1146f7d


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.