ETH Price: $2,468.47 (+1.32%)

Contract

0x179bfEe929bA3A64b3096982057e7755b28cCD96
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Tokens192040362024-02-11 9:49:11244 days ago1707644951IN
0x179bfEe9...5b28cCD96
0 ETH0.0017901928.48087811
Claim Tokens192014632024-02-11 1:08:59245 days ago1707613739IN
0x179bfEe9...5b28cCD96
0 ETH0.003145922.606417
Claim Tokens191980922024-02-10 13:46:11245 days ago1707572771IN
0x179bfEe9...5b28cCD96
0 ETH0.001937630.8261164
Claim Tokens191977472024-02-10 12:36:11245 days ago1707568571IN
0x179bfEe9...5b28cCD96
0 ETH0.0042776930.73941175
Claim Tokens191976732024-02-10 12:20:59245 days ago1707567659IN
0x179bfEe9...5b28cCD96
0 ETH0.0016829126.77419728
Claim Tokens191963172024-02-10 7:46:35245 days ago1707551195IN
0x179bfEe9...5b28cCD96
0 ETH0.0043605834.92375584
Claim Tokens191960182024-02-10 6:46:11245 days ago1707547571IN
0x179bfEe9...5b28cCD96
0 ETH0.0007962133.88996861
Claim Tokens191960172024-02-10 6:45:59245 days ago1707547559IN
0x179bfEe9...5b28cCD96
0 ETH0.0007463531.76802514
Claim Tokens191960102024-02-10 6:44:35245 days ago1707547475IN
0x179bfEe9...5b28cCD96
0 ETH0.0047185433.90731011
Claim Tokens191958492024-02-10 6:12:11245 days ago1707545531IN
0x179bfEe9...5b28cCD96
0 ETH0.0042757734.24458273
Claim Tokens191956702024-02-10 5:36:23245 days ago1707543383IN
0x179bfEe9...5b28cCD96
0 ETH0.0056749240.77986765
Claim Tokens191956542024-02-10 5:33:11245 days ago1707543191IN
0x179bfEe9...5b28cCD96
0 ETH0.0044027331.63795203
Claim Tokens191954982024-02-10 5:01:35245 days ago1707541295IN
0x179bfEe9...5b28cCD96
0 ETH0.0023086936.72985869
Claim Tokens191951212024-02-10 3:45:35245 days ago1707536735IN
0x179bfEe9...5b28cCD96
0 ETH0.0057847527.72284238
Claim Tokens191946682024-02-10 2:14:47246 days ago1707531287IN
0x179bfEe9...5b28cCD96
0 ETH0.0008670936.90708678
Claim Tokens191946082024-02-10 2:02:47246 days ago1707530567IN
0x179bfEe9...5b28cCD96
0 ETH0.0083745440.13411521
Claim Tokens191945872024-02-10 1:58:35246 days ago1707530315IN
0x179bfEe9...5b28cCD96
0 ETH0.0066232447.59445642
Claim Tokens191945452024-02-10 1:50:11246 days ago1707529811IN
0x179bfEe9...5b28cCD96
0 ETH0.0023239636.97277636
Claim Tokens191945322024-02-10 1:47:35246 days ago1707529655IN
0x179bfEe9...5b28cCD96
0 ETH0.0020854733.17868571
Claim Tokens191945042024-02-10 1:41:59246 days ago1707529319IN
0x179bfEe9...5b28cCD96
0 ETH0.0051426836.95522217
Claim Tokens191945022024-02-10 1:41:35246 days ago1707529295IN
0x179bfEe9...5b28cCD96
0 ETH0.0090869732.66721034
Claim Tokens191943022024-02-10 1:01:23246 days ago1707526883IN
0x179bfEe9...5b28cCD96
0 ETH0.0016845336.81568159
Claim Tokens191942872024-02-10 0:58:23246 days ago1707526703IN
0x179bfEe9...5b28cCD96
0 ETH0.0044761732.16563942
Claim Tokens191942862024-02-10 0:58:11246 days ago1707526691IN
0x179bfEe9...5b28cCD96
0 ETH0.0180373832.43060182
Claim Tokens191942842024-02-10 0:57:47246 days ago1707526667IN
0x179bfEe9...5b28cCD96
0 ETH0.0096781234.79238324
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChaosGemsClaim

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 2 : ChaosGemsClaim.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

/*

 ▄████▄   ██░ ██  ▄▄▄       ▒█████    ██████      ▄████ ▓█████  ███▄ ▄███▓  ██████
▒██▀ ▀█  ▓██░ ██▒▒████▄    ▒██▒  ██▒▒██    ▒     ██▒ ▀█▒▓█   ▀ ▓██▒▀█▀ ██▒▒██    ▒
▒▓█    ▄ ▒██▀▀██░▒██  ▀█▄  ▒██░  ██▒░ ▓██▄      ▒██░▄▄▄░▒███   ▓██    ▓██░░ ▓██▄
▒▓▓▄ ▄██▒░▓█ ░██ ░██▄▄▄▄██ ▒██   ██░  ▒   ██▒   ░▓█  ██▓▒▓█  ▄ ▒██    ▒██   ▒   ██▒
▒ ▓███▀ ░░▓█▒░██▓ ▓█   ▓██▒░ ████▓▒░▒██████▒▒   ░▒▓███▀▒░▒████▒▒██▒   ░██▒▒██████▒▒
░ ░▒ ▒  ░ ▒ ░░▒░▒ ▒▒   ▓▒█░░ ▒░▒░▒░ ▒ ▒▓▒ ▒ ░    ░▒   ▒ ░░ ▒░ ░░ ▒░   ░  ░▒ ▒▓▒ ▒ ░
  ░  ▒    ▒ ░▒░ ░  ▒   ▒▒ ░  ░ ▒ ▒░ ░ ░▒  ░ ░     ░   ░  ░ ░  ░░  ░      ░░ ░▒  ░ ░
░         ░  ░░ ░  ░   ▒   ░ ░ ░ ▒  ░  ░  ░     ░ ░   ░    ░   ░      ░   ░  ░  ░
░ ░       ░  ░  ░      ░  ░    ░ ░        ░           ░    ░  ░       ░         ░
░

┌┼┐╔═╗╦ ╦╔═╗╔═╗╔═╗
└┼┐║  ╠═╣╠═╣║ ║╚═╗
└┼┘╚═╝╩ ╩╩ ╩╚═╝╚═╝

*/

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

contract ChaosGemsClaim {
    address public owner;
    IERC20 public token;

    mapping(address => uint256) public whitelist;

    constructor(IERC20 _tokenAddress) {
        owner = msg.sender;
        token = IERC20(_tokenAddress);
    }

    modifier onlyOwner() {
        require(msg.sender == owner, "Not owner");
        _;
    }

    // Function to add addresses to the whitelist
    function addToWhitelist(
        address[] calldata addresses,
        uint256[] calldata amounts
    ) external onlyOwner {
        require(
            addresses.length == amounts.length,
            "Array lengths do not match"
        );

        for (uint256 i = 0; i < addresses.length; i++) {
            whitelist[addresses[i]] = amounts[i];
        }
    }

    // Function to claim tokens
    function claimTokens() external {
        uint256 amount = whitelist[msg.sender];
        require(amount > 0, "Not on whitelist or no tokens to claim");
        require(
            token.balanceOf(address(this)) >= amount,
            "Insufficient tokens in contract"
        );

        whitelist[msg.sender] = 0;
        require(token.transfer(msg.sender, amount), "Transfer failed");
    }

    // Function to recover any ERC20 tokens sent to the contract by mistake
    function recoverERC20() external onlyOwner {
        token.transfer(owner, token.balanceOf(address(this)));
    }
}

File 2 of 2 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_tokenAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b5060405161073c38038061073c83398101604081905261002f91610062565b60008054336001600160a01b031991821617909155600180549091166001600160a01b0392909216919091179055610092565b60006020828403121561007457600080fd5b81516001600160a01b038116811461008b57600080fd5b9392505050565b61069b806100a16000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806348c54b9d146100675780637c0f1ee7146100715780638da5cb5b146100795780639b19251a146100a9578063f8d50542146100d7578063fc0c546a146100ea575b600080fd5b61006f6100fd565b005b61006f6102f1565b60005461008c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c96100b736600461052c565b60026020526000908152604090205481565b6040519081526020016100a0565b61006f6100e53660046105a8565b61041f565b60015461008c906001600160a01b031681565b336000908152600260205260409020548061016e5760405162461bcd60e51b815260206004820152602660248201527f4e6f74206f6e2077686974656c697374206f72206e6f20746f6b656e7320746f60448201526520636c61696d60d01b60648201526084015b60405180910390fd5b6001546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa1580156101b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101da9190610614565b10156102285760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e7420746f6b656e7320696e20636f6e7472616374006044820152606401610165565b3360008181526002602052604080822091909155600154905163a9059cbb60e01b81526004810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561028c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b0919061062d565b6102ee5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610165565b50565b6000546001600160a01b031633146103375760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610165565b6001546000546040516370a0823160e01b81523060048201526001600160a01b039283169263a9059cbb92169083906370a0823190602401602060405180830381865afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190610614565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156103fb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ee919061062d565b6000546001600160a01b031633146104655760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610165565b8281146104b45760405162461bcd60e51b815260206004820152601a60248201527f4172726179206c656e6774687320646f206e6f74206d617463680000000000006044820152606401610165565b60005b83811015610525578282828181106104d1576104d161064f565b90506020020135600260008787858181106104ee576104ee61064f565b9050602002016020810190610503919061052c565b6001600160a01b031681526020810191909152604001600020556001016104b7565b5050505050565b60006020828403121561053e57600080fd5b81356001600160a01b038116811461055557600080fd5b9392505050565b60008083601f84011261056e57600080fd5b50813567ffffffffffffffff81111561058657600080fd5b6020830191508360208260051b85010111156105a157600080fd5b9250929050565b600080600080604085870312156105be57600080fd5b843567ffffffffffffffff808211156105d657600080fd5b6105e28883890161055c565b909650945060208701359150808211156105fb57600080fd5b506106088782880161055c565b95989497509550505050565b60006020828403121561062657600080fd5b5051919050565b60006020828403121561063f57600080fd5b8151801515811461055557600080fd5b634e487b7160e01b600052603260045260246000fdfea2646970667358221220e286ad9829937b0c83608b7c8b09e8d46f518deb15a7a854f4f531759bb465fc64736f6c6343000817003300000000000000000000000026940d0149c2c87ffcc2aba442fef1881463850e

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c806348c54b9d146100675780637c0f1ee7146100715780638da5cb5b146100795780639b19251a146100a9578063f8d50542146100d7578063fc0c546a146100ea575b600080fd5b61006f6100fd565b005b61006f6102f1565b60005461008c906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6100c96100b736600461052c565b60026020526000908152604090205481565b6040519081526020016100a0565b61006f6100e53660046105a8565b61041f565b60015461008c906001600160a01b031681565b336000908152600260205260409020548061016e5760405162461bcd60e51b815260206004820152602660248201527f4e6f74206f6e2077686974656c697374206f72206e6f20746f6b656e7320746f60448201526520636c61696d60d01b60648201526084015b60405180910390fd5b6001546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa1580156101b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101da9190610614565b10156102285760405162461bcd60e51b815260206004820152601f60248201527f496e73756666696369656e7420746f6b656e7320696e20636f6e7472616374006044820152606401610165565b3360008181526002602052604080822091909155600154905163a9059cbb60e01b81526004810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561028c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b0919061062d565b6102ee5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610165565b50565b6000546001600160a01b031633146103375760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610165565b6001546000546040516370a0823160e01b81523060048201526001600160a01b039283169263a9059cbb92169083906370a0823190602401602060405180830381865afa15801561038c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b09190610614565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156103fb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ee919061062d565b6000546001600160a01b031633146104655760405162461bcd60e51b81526020600482015260096024820152682737ba1037bbb732b960b91b6044820152606401610165565b8281146104b45760405162461bcd60e51b815260206004820152601a60248201527f4172726179206c656e6774687320646f206e6f74206d617463680000000000006044820152606401610165565b60005b83811015610525578282828181106104d1576104d161064f565b90506020020135600260008787858181106104ee576104ee61064f565b9050602002016020810190610503919061052c565b6001600160a01b031681526020810191909152604001600020556001016104b7565b5050505050565b60006020828403121561053e57600080fd5b81356001600160a01b038116811461055557600080fd5b9392505050565b60008083601f84011261056e57600080fd5b50813567ffffffffffffffff81111561058657600080fd5b6020830191508360208260051b85010111156105a157600080fd5b9250929050565b600080600080604085870312156105be57600080fd5b843567ffffffffffffffff808211156105d657600080fd5b6105e28883890161055c565b909650945060208701359150808211156105fb57600080fd5b506106088782880161055c565b95989497509550505050565b60006020828403121561062657600080fd5b5051919050565b60006020828403121561063f57600080fd5b8151801515811461055557600080fd5b634e487b7160e01b600052603260045260246000fdfea2646970667358221220e286ad9829937b0c83608b7c8b09e8d46f518deb15a7a854f4f531759bb465fc64736f6c63430008170033

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

00000000000000000000000026940d0149c2c87ffcc2aba442fef1881463850e

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0x26940d0149C2c87ffcc2AbA442fEf1881463850e

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000026940d0149c2c87ffcc2aba442fef1881463850e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.