ETH Price: $2,443.71 (-9.27%)

Contract

0xca8EdCCF471A213cfd70D73117Ac7F49Bfc00B72

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Claim3929977312025-10-24 19:15:4099 days ago1761333340IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000870.01
Claim3928437402025-10-24 8:35:1599 days ago1761294915IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000920.01
Claim3928296532025-10-24 7:36:4099 days ago1761291400IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000920.01
Claim3927968102025-10-24 5:20:07100 days ago1761283207IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000920.01
Claim3927960532025-10-24 5:16:59100 days ago1761283019IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000930.010092
Transfer Ownersh...3927781152025-10-24 4:02:23100 days ago1761278543IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000290.010306
Claim3251818002025-04-11 7:49:43295 days ago1744357783IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000930.01
Claim3251774572025-04-11 7:31:33295 days ago1744356693IN
0xca8EdCCF...9Bfc00B72
0 ETH0.00000080.01
Claim3251579432025-04-11 6:10:17295 days ago1744351817IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000001080.011167
Claim3251528432025-04-11 5:48:57295 days ago1744350537IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000970.01
Claim3251523782025-04-11 5:47:01295 days ago1744350421IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000980.01
Claim3251509692025-04-11 5:41:08295 days ago1744350068IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000810.01
Claim3251501632025-04-11 5:37:48295 days ago1744349868IN
0xca8EdCCF...9Bfc00B72
0 ETH0.00000080.01
Claim3251447892025-04-11 5:15:25296 days ago1744348525IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000810.01
Claim3251409122025-04-11 4:59:17296 days ago1744347557IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000810.01
Claim3251385792025-04-11 4:49:35296 days ago1744346975IN
0xca8EdCCF...9Bfc00B72
0 ETH0.00000080.01
Add Users3251381182025-04-11 4:47:39296 days ago1744346859IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000002650.01
Add Campaign3251281092025-04-11 4:05:57296 days ago1744344357IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000470.01
Claim3160530762025-03-15 20:08:04322 days ago1742069284IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000860.01
Claim3156655872025-03-14 17:04:10323 days ago1741971850IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000001360.011457
Claim3156407162025-03-14 15:20:27323 days ago1741965627IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000009380.103011
Claim3156069382025-03-14 12:59:38323 days ago1741957178IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000940.01
Claim3155819592025-03-14 11:15:15323 days ago1741950915IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000930.01
Claim3155770342025-03-14 10:54:41323 days ago1741949681IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000920.01
Claim3155379472025-03-14 8:11:30323 days ago1741939890IN
0xca8EdCCF...9Bfc00B72
0 ETH0.000000880.01
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
QuestTokenRewardManager

Compiler Version
v0.8.22+commit.4fc1097e

Optimization Enabled:
Yes with 100000 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

* MIT License
* ===========
*
* Copyright (c) 2024 WOOFi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.

*/

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

import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";

import {IQuestTokenRewardManager} from "../interfaces/staking/IQuestTokenRewardManager.sol";

contract QuestTokenRewardManager is IQuestTokenRewardManager, Ownable, ReentrancyGuard {
    /* ----- Constants ----- */

    address public constant ETH_PLACEHOLDER = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /* ----- Variables ----- */

    // campaignId => isActive
    mapping(uint256 => bool) public isActiveCampaign;

    // campaignId => tokenAddress => userAddress => rewardAmount
    mapping(uint256 => mapping(address => mapping(address => uint256))) private userRewardAmounts;

    // campaignId => tokenAddress => userAddress => isClaimed
    mapping(uint256 => mapping(address => mapping(address => bool))) private isUserClaimed;

    receive() external payable {}

    /* ----- Constructor ----- */

    constructor(address _owner) Ownable(_owner) {}

    // --------------------- Business Functions --------------------- //

    function claim(uint256 _campaignId, address _token) external nonReentrant {
        _claim(_campaignId, _token, msg.sender);
    }

    function claimableInfo(
        uint256 _campaignId,
        address _token,
        address _user
    ) external view returns (bool, uint256) {
        uint256 userRewardAmount = userRewardAmounts[_campaignId][_token][_user];
        bool isClaimable = userRewardAmount > 0 && !isUserClaimed[_campaignId][_token][_user];

        return (isClaimable, isClaimable ? userRewardAmount : 0);
    }

    function claimedInfo(
        uint256 _campaignId,
        address _token,
        address _user
    ) external view returns (bool, uint256) {
        uint256 userRewardAmount = userRewardAmounts[_campaignId][_token][_user];
        bool isClaimed = isUserClaimed[_campaignId][_token][_user];

        return (isClaimed, isClaimed ? userRewardAmount : 0);
    }

    // --------------------- Internal Functions --------------------- //

    function _claim(
        uint256 _campaignId,
        address _token,
        address _user
    ) internal {
        require(isActiveCampaign[_campaignId], "QuestTokenRewardManager: !_campaignId");
        uint256 userRewardAmount = userRewardAmounts[_campaignId][_token][_user];
        if (userRewardAmount > 0 && !isUserClaimed[_campaignId][_token][_user]) {
            isUserClaimed[_campaignId][_token][_user] = true;
            if (_token == ETH_PLACEHOLDER) {
                TransferHelper.safeTransferETH(_user, userRewardAmount);
            } else {
                TransferHelper.safeTransfer(_token, _user, userRewardAmount);
            }
        }
    }

    function _addUser(
        uint256 _campaignId,
        address _token,
        address _user,
        uint256 _rewardAmount
    ) internal {
        userRewardAmounts[_campaignId][_token][_user] = _rewardAmount;
    }

    function _removeUser(
        uint256 _campaignId,
        address _token,
        address _user
    ) internal returns (bool removed) {
        uint256 userRewardAmount = userRewardAmounts[_campaignId][_token][_user];
        if (userRewardAmount == 0) {
            return false;
        }
        userRewardAmounts[_campaignId][_token][_user] = 0;
        if (isUserClaimed[_campaignId][_token][_user]) {
            isUserClaimed[_campaignId][_token][_user] = false;
        }
        return true;
    }

    // --------------------- Admin Functions --------------------- //

    function claim(
        uint256 _campaignId,
        address _token,
        address _user
    ) external onlyOwner {
        _claim(_campaignId, _token, _user);
    }

    function addUsers(
        uint256 _campaignId,
        address _token,
        address[] memory _users,
        uint256[] memory _rewardAmounts
    ) external onlyOwner {
        uint256 len = _users.length;
        for (uint256 i = 0; i < len; ++i) {
            _addUser(_campaignId, _token, _users[i], _rewardAmounts[i]);
        }
    }

    function removeUsers(
        uint256 _campaignId,
        address _token,
        address[] memory _users
    ) external onlyOwner {
        uint256 len = _users.length;
        for (uint256 i = 0; i < len; ++i) {
            _removeUser(_campaignId, _token, _users[i]);
        }
    }

    function addCampaign(uint256 _campaignId) external onlyOwner {
        isActiveCampaign[_campaignId] = true;
    }

    function removeCampaign(uint256 _campaignId) external onlyOwner {
        isActiveCampaign[_campaignId] = false;
    }

    function inCaseTokenGotStuck(address _stuckToken) external onlyOwner {
        if (_stuckToken == ETH_PLACEHOLDER) {
            TransferHelper.safeTransferETH(msg.sender, address(this).balance);
        } else {
            uint256 amount = IERC20(_stuckToken).balanceOf(address(this));
            TransferHelper.safeTransfer(_stuckToken, msg.sender, amount);
        }
    }
}

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

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

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

    constructor() {
        _status = NOT_ENTERED;
    }

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

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

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

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

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

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

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

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

* MIT License
* ===========
*
* Copyright (c) 2024 WOOFi
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.

*/

interface IQuestTokenRewardManager {
    function claim(uint256 _campaignId, address _token) external;

    function claimableInfo(
        uint256 _campaignId,
        address _token,
        address _user
    ) external view returns (bool isClaimable, uint256 claimableAmount);

    function claimedInfo(
        uint256 _campaignId,
        address _token,
        address _user
    ) external view returns (bool isClaimed, uint256 claimedAmount);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 100000
  },
  "viaIR": true,
  "debug": {
    "revertStrings": "strip"
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ETH_PLACEHOLDER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"}],"name":"addCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_rewardAmounts","type":"uint256[]"}],"name":"addUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"claimableInfo","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_user","type":"address"}],"name":"claimedInfo","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_stuckToken","type":"address"}],"name":"inCaseTokenGotStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isActiveCampaign","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"}],"name":"removeCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignId","type":"uint256"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address[]","name":"_users","type":"address[]"}],"name":"removeUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080346100bf57601f610fa538819003918201601f19168301916001600160401b038311848410176100c4578084926020946040528339810103126100bf57516001600160a01b0390818116908190036100bf5780156100a657600080546001600160a01b03198116831782556040519316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360018055610eca90816100db8239f35b604051631e4fbdf760e01b815260006004820152602490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe60406080815260049081361015610020575b5050361561001e57600080fd5b005b600091823560e01c80632cd1b113146108e4578063372bfd93146108795780635ada4971146107e8578063715018a61461074957806377517a481461068a5780637f3424181461054c5780638da5cb5b146104fb578063904fc7e8146104b1578063c45e15a014610464578063c822d83e146103b3578063ddd5e1b21461032e578063e1a4e72a1461021a578063f2fde38b146101385763fdef1c6f146100c75750610011565b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134576100fe610af7565b3582526002602052812060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905580f35b8280fd5b50346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345761017061092c565b90610179610af7565b73ffffffffffffffffffffffffffffffffffffffff8092169283156101eb5750508254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b5090346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345761025361092c565b61025b610af7565b73ffffffffffffffffffffffffffffffffffffffff81169273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee840361029f575050505061029c4733610e62565b80f35b60209060248451809681937f70a0823100000000000000000000000000000000000000000000000000000000835230908301525afa918215610325575083916102ef575b61029c92503390610d9c565b90506020823d60201161031d575b8161030a602093836109af565b810103126101345761029c9151906102e3565b3d91506102fd565b513d85823e3d90fd5b50903461013457807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457610366610904565b9060026001541461038b575090610384916002600155339135610b48565b6001805580f35b9050517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b8382346104605760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104605780356103ee610904565b916044359067ffffffffffffffff821161045c5761040e91369101610a37565b91610417610af7565b825192845b848110610427578580f35b8061045573ffffffffffffffffffffffffffffffffffffffff61044c60019486610ab4565b51168587610c5d565b500161041c565b8480fd5b5080fd5b50503461046057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610460576020905173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b50346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134578160209360ff923581526002855220541690519015158152f35b50503461046057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104605773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b5090346101345760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457813590610588610904565b67ffffffffffffffff90604435828111610686576105a99036908701610a37565b94606435928311610686573660238401121561068657820135906105cc82610a1f565b926105d9855194856109af565b82845260209260248486019160051b8301019136831161068257929792602401905b8282106106735750505061060d610af7565b80519573ffffffffffffffffffffffffffffffffffffffff90811691885b888110610636578980f35b808361064460019385610ab4565b51166106508289610ab4565b518a8d5260038852898d20878e528852898d20918d52908752888c20550161062b565b813581529084019084016105fb565b8980fd5b8680fd5b508290346104605761069b3661094f565b90828594939452602090600382528686209073ffffffffffffffffffffffffffffffffffffffff809116918288528352878720931692838752825286862054938415159586610720575b505050505082610714929350836000146107185750925b51911515825260208201929092529081906040820190565b0390f35b9050926106fc565b875282528686209086528152858520918552528383205460ff16159150610714858080806106e5565b83346107e557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107e557610780610af7565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b5082903461046057610714906107fd3661094f565b919290838652602091600383528787209173ffffffffffffffffffffffffffffffffffffffff809116928389528452888820941693848852835287872054948752825286862090865281528585209185525260ff8484205416928360001461071857509251911515825260208201929092529081906040820190565b50346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134576108b1610af7565b358252600260205281207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905580f35b83346107e55761029c6108f63661094f565b916108ff610af7565b610b48565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361092757565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361092757565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610927576004359073ffffffffffffffffffffffffffffffffffffffff906024358281168103610927579160443590811681036109275790565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176109f057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116109f05760051b60200190565b9080601f83011215610927576020908235610a5181610a1f565b93610a5f60405195866109af565b81855260208086019260051b82010192831161092757602001905b828210610a88575050505090565b813573ffffffffffffffffffffffffffffffffffffffff81168103610927578152908301908301610a7a565b8051821015610ac85760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff600054163303610b1857565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b909160009180835260209260028452604060ff81832054161561046057600385528082209173ffffffffffffffffffffffffffffffffffffffff808816938483528752828220908616908183528752828220549687151580610c38575b610bb5575b505050505050505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee958352600481528383208584528152838320918352522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905514600014610c2a57610c1c9250610e62565b388080808080808080610baa565b610c3392610d9c565b610c1c565b50858352600481528383208584528152838320828452815260ff848420541615610ba5565b91600091838352602090600382526040948585209173ffffffffffffffffffffffffffffffffffffffff80911692838752845286862094169384865283528585205415610d355780855260038352858520828652835285852084865283528486812055808552600483528585208286528352858520848652835260ff8686205416610cee575b505050505050600190565b845260048252848420908452815283832091835252207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008154169055388080808080610ce3565b50505050905090565b3d15610d97573d9067ffffffffffffffff82116109f05760405191610d8b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846109af565b82523d6000602084013e565b606090565b916040519073ffffffffffffffffffffffffffffffffffffffff60208301937fa9059cbb0000000000000000000000000000000000000000000000000000000085521660248301526044820152604481526080810181811067ffffffffffffffff8211176109f057604052600092839283809351925af1610e1b610d3e565b81610e2a575b50156107e55750565b8051801592508215610e3f575b505038610e21565b819250906020918101031261046057602001518015158103610460573880610e37565b6040516020810181811067ffffffffffffffff8211176109f05760405260008080948194828095525af1610e21610d3e56fea2646970667358221220b101bd3bb2c8cd506959d3841a4ae310e608ee09441bba1e3a117d526047d4b464736f6c6343000816003300000000000000000000000047fc45cebfc47cef07a09a98405b6ebaef00ef75

Deployed Bytecode

0x60406080815260049081361015610020575b5050361561001e57600080fd5b005b600091823560e01c80632cd1b113146108e4578063372bfd93146108795780635ada4971146107e8578063715018a61461074957806377517a481461068a5780637f3424181461054c5780638da5cb5b146104fb578063904fc7e8146104b1578063c45e15a014610464578063c822d83e146103b3578063ddd5e1b21461032e578063e1a4e72a1461021a578063f2fde38b146101385763fdef1c6f146100c75750610011565b346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134576100fe610af7565b3582526002602052812060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905580f35b8280fd5b50346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345761017061092c565b90610179610af7565b73ffffffffffffffffffffffffffffffffffffffff8092169283156101eb5750508254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b5090346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101345761025361092c565b61025b610af7565b73ffffffffffffffffffffffffffffffffffffffff81169273eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee840361029f575050505061029c4733610e62565b80f35b60209060248451809681937f70a0823100000000000000000000000000000000000000000000000000000000835230908301525afa918215610325575083916102ef575b61029c92503390610d9c565b90506020823d60201161031d575b8161030a602093836109af565b810103126101345761029c9151906102e3565b3d91506102fd565b513d85823e3d90fd5b50903461013457807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457610366610904565b9060026001541461038b575090610384916002600155339135610b48565b6001805580f35b9050517f3ee5aeb5000000000000000000000000000000000000000000000000000000008152fd5b8382346104605760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104605780356103ee610904565b916044359067ffffffffffffffff821161045c5761040e91369101610a37565b91610417610af7565b825192845b848110610427578580f35b8061045573ffffffffffffffffffffffffffffffffffffffff61044c60019486610ab4565b51168587610c5d565b500161041c565b8480fd5b5080fd5b50503461046057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610460576020905173eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee8152f35b50346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134578160209360ff923581526002855220541690519015158152f35b50503461046057817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126104605773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b5090346101345760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261013457813590610588610904565b67ffffffffffffffff90604435828111610686576105a99036908701610a37565b94606435928311610686573660238401121561068657820135906105cc82610a1f565b926105d9855194856109af565b82845260209260248486019160051b8301019136831161068257929792602401905b8282106106735750505061060d610af7565b80519573ffffffffffffffffffffffffffffffffffffffff90811691885b888110610636578980f35b808361064460019385610ab4565b51166106508289610ab4565b518a8d5260038852898d20878e528852898d20918d52908752888c20550161062b565b813581529084019084016105fb565b8980fd5b8680fd5b508290346104605761069b3661094f565b90828594939452602090600382528686209073ffffffffffffffffffffffffffffffffffffffff809116918288528352878720931692838752825286862054938415159586610720575b505050505082610714929350836000146107185750925b51911515825260208201929092529081906040820190565b0390f35b9050926106fc565b875282528686209086528152858520918552528383205460ff16159150610714858080806106e5565b83346107e557807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126107e557610780610af7565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b5082903461046057610714906107fd3661094f565b919290838652602091600383528787209173ffffffffffffffffffffffffffffffffffffffff809116928389528452888820941693848852835287872054948752825286862090865281528585209185525260ff8484205416928360001461071857509251911515825260208201929092529081906040820190565b50346101345760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610134576108b1610af7565b358252600260205281207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905580f35b83346107e55761029c6108f63661094f565b916108ff610af7565b610b48565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361092757565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361092757565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6060910112610927576004359073ffffffffffffffffffffffffffffffffffffffff906024358281168103610927579160443590811681036109275790565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176109f057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff81116109f05760051b60200190565b9080601f83011215610927576020908235610a5181610a1f565b93610a5f60405195866109af565b81855260208086019260051b82010192831161092757602001905b828210610a88575050505090565b813573ffffffffffffffffffffffffffffffffffffffff81168103610927578152908301908301610a7a565b8051821015610ac85760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff600054163303610b1857565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b909160009180835260209260028452604060ff81832054161561046057600385528082209173ffffffffffffffffffffffffffffffffffffffff808816938483528752828220908616908183528752828220549687151580610c38575b610bb5575b505050505050505050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee958352600481528383208584528152838320918352522060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905514600014610c2a57610c1c9250610e62565b388080808080808080610baa565b610c3392610d9c565b610c1c565b50858352600481528383208584528152838320828452815260ff848420541615610ba5565b91600091838352602090600382526040948585209173ffffffffffffffffffffffffffffffffffffffff80911692838752845286862094169384865283528585205415610d355780855260038352858520828652835285852084865283528486812055808552600483528585208286528352858520848652835260ff8686205416610cee575b505050505050600190565b845260048252848420908452815283832091835252207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008154169055388080808080610ce3565b50505050905090565b3d15610d97573d9067ffffffffffffffff82116109f05760405191610d8b60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601846109af565b82523d6000602084013e565b606090565b916040519073ffffffffffffffffffffffffffffffffffffffff60208301937fa9059cbb0000000000000000000000000000000000000000000000000000000085521660248301526044820152604481526080810181811067ffffffffffffffff8211176109f057604052600092839283809351925af1610e1b610d3e565b81610e2a575b50156107e55750565b8051801592508215610e3f575b505038610e21565b819250906020918101031261046057602001518015158103610460573880610e37565b6040516020810181811067ffffffffffffffff8211176109f05760405260008080948194828095525af1610e21610d3e56fea2646970667358221220b101bd3bb2c8cd506959d3841a4ae310e608ee09441bba1e3a117d526047d4b464736f6c63430008160033

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

00000000000000000000000047fc45cebfc47cef07a09a98405b6ebaef00ef75

-----Decoded View---------------
Arg [0] : _owner (address): 0x47fc45CEBFc47Cef07a09A98405B6EBAeF00ef75

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000047fc45cebfc47cef07a09a98405b6ebaef00ef75


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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.