Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 206 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Tokens | 19204036 | 244 days ago | IN | 0 ETH | 0.00179019 | ||||
Claim Tokens | 19201463 | 245 days ago | IN | 0 ETH | 0.0031459 | ||||
Claim Tokens | 19198092 | 245 days ago | IN | 0 ETH | 0.0019376 | ||||
Claim Tokens | 19197747 | 245 days ago | IN | 0 ETH | 0.00427769 | ||||
Claim Tokens | 19197673 | 245 days ago | IN | 0 ETH | 0.00168291 | ||||
Claim Tokens | 19196317 | 245 days ago | IN | 0 ETH | 0.00436058 | ||||
Claim Tokens | 19196018 | 245 days ago | IN | 0 ETH | 0.00079621 | ||||
Claim Tokens | 19196017 | 245 days ago | IN | 0 ETH | 0.00074635 | ||||
Claim Tokens | 19196010 | 245 days ago | IN | 0 ETH | 0.00471854 | ||||
Claim Tokens | 19195849 | 245 days ago | IN | 0 ETH | 0.00427577 | ||||
Claim Tokens | 19195670 | 245 days ago | IN | 0 ETH | 0.00567492 | ||||
Claim Tokens | 19195654 | 245 days ago | IN | 0 ETH | 0.00440273 | ||||
Claim Tokens | 19195498 | 245 days ago | IN | 0 ETH | 0.00230869 | ||||
Claim Tokens | 19195121 | 245 days ago | IN | 0 ETH | 0.00578475 | ||||
Claim Tokens | 19194668 | 246 days ago | IN | 0 ETH | 0.00086709 | ||||
Claim Tokens | 19194608 | 246 days ago | IN | 0 ETH | 0.00837454 | ||||
Claim Tokens | 19194587 | 246 days ago | IN | 0 ETH | 0.00662324 | ||||
Claim Tokens | 19194545 | 246 days ago | IN | 0 ETH | 0.00232396 | ||||
Claim Tokens | 19194532 | 246 days ago | IN | 0 ETH | 0.00208547 | ||||
Claim Tokens | 19194504 | 246 days ago | IN | 0 ETH | 0.00514268 | ||||
Claim Tokens | 19194502 | 246 days ago | IN | 0 ETH | 0.00908697 | ||||
Claim Tokens | 19194302 | 246 days ago | IN | 0 ETH | 0.00168453 | ||||
Claim Tokens | 19194287 | 246 days ago | IN | 0 ETH | 0.00447617 | ||||
Claim Tokens | 19194286 | 246 days ago | IN | 0 ETH | 0.01803738 | ||||
Claim Tokens | 19194284 | 246 days ago | IN | 0 ETH | 0.00967812 |
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
Contract Source Code (Solidity Standard Json-Input format)
//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))); } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.