POL Price: $0.2179 (-0.19%)
Gas: 30 GWei
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Retrieve Tokens478550492023-09-22 16:00:44578 days ago1695398444IN
0x24c54dC9...13bBBD75f
0 POL0.0032313580.44990778
Toggle Claim478550332023-09-22 16:00:10578 days ago1695398410IN
0x24c54dC9...13bBBD75f
0 POL0.0018025276.20040938
Claim478535532023-09-22 15:07:29578 days ago1695395249IN
0x24c54dC9...13bBBD75f
0 POL0.005202981.96644213
Claim478529372023-09-22 14:45:39578 days ago1695393939IN
0x24c54dC9...13bBBD75f
0 POL0.00644281101.5
Claim478492532023-09-22 12:32:10578 days ago1695385930IN
0x24c54dC9...13bBBD75f
0 POL0.00704749111.02613696
Claim478422242023-09-22 8:20:20578 days ago1695370820IN
0x24c54dC9...13bBBD75f
0 POL0.0064047100.89961698
Claim478406312023-09-22 7:23:26579 days ago1695367406IN
0x24c54dC9...13bBBD75f
0 POL0.0050668979.82381298
Claim478404052023-09-22 7:15:20579 days ago1695366920IN
0x24c54dC9...13bBBD75f
0 POL0.0054078485.19512072
Claim478343972023-09-22 3:29:46579 days ago1695353386IN
0x24c54dC9...13bBBD75f
0 POL0.0051550681.21281786
Claim478318652023-09-22 1:56:17579 days ago1695347777IN
0x24c54dC9...13bBBD75f
0 POL0.0049862478.55318517
Claim478239872023-09-21 21:12:51579 days ago1695330771IN
0x24c54dC9...13bBBD75f
0 POL0.00636931100.34204935
Claim478204492023-09-21 19:07:28579 days ago1695323248IN
0x24c54dC9...13bBBD75f
0 POL0.00848813133.7219725
Claim478173622023-09-21 17:17:34579 days ago1695316654IN
0x24c54dC9...13bBBD75f
0 POL0.0040282186.85985835
Set Claim Amount478110102023-09-21 13:25:46579 days ago1695302746IN
0x24c54dC9...13bBBD75f
0 POL0.00769981107.7922902
Remove Claim Amo...478109772023-09-21 13:24:36579 days ago1695302676IN
0x24c54dC9...13bBBD75f
0 POL0.0018051274.56740421
Remove Claim Amo...478109722023-09-21 13:24:24579 days ago1695302664IN
0x24c54dC9...13bBBD75f
0 POL0.00340099140.49061992
Claim478086602023-09-21 11:58:16579 days ago1695297496IN
0x24c54dC9...13bBBD75f
0 POL0.0041347565.13884306
Claim478028762023-09-21 8:28:26579 days ago1695284906IN
0x24c54dC9...13bBBD75f
0 POL0.0057243990.18211114
Claim478027842023-09-21 8:25:12579 days ago1695284712IN
0x24c54dC9...13bBBD75f
0 POL0.0056079488.3474632
Claim478019072023-09-21 7:53:12579 days ago1695282792IN
0x24c54dC9...13bBBD75f
0 POL0.0030099197.94710425
Claim478007722023-09-21 7:10:42580 days ago1695280242IN
0x24c54dC9...13bBBD75f
0 POL0.00653309102.92223778
Claim478006112023-09-21 7:04:59580 days ago1695279899IN
0x24c54dC9...13bBBD75f
0 POL0.0051498381.13037255
Claim478003102023-09-21 6:53:11580 days ago1695279191IN
0x24c54dC9...13bBBD75f
0 POL0.00684804107.88407552
Claim478000352023-09-21 6:42:59580 days ago1695278579IN
0x24c54dC9...13bBBD75f
0 POL0.0052761483.12029304
Claim477948202023-09-21 3:29:06580 days ago1695266946IN
0x24c54dC9...13bBBD75f
0 POL0.0055034886.70176916
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x9231f133...Ed91B4f62
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
SANDClaim

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : SANDClaim.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

interface IERC20 {
    function transfer(address recipient, uint256 amount) external returns (bool);
    function balanceOf(address account) external view returns (uint256);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}

contract SANDClaim is Ownable, ReentrancyGuard {
    IERC20 public token;
    mapping(address => uint256) public claimAmount;
    bool public isClaimEnabled = false;
    
    /**
     * @dev Constructor that sets the initial token address.
     * @param _token The address of the ERC20 token.
     */
    constructor(address _token) {
        token = IERC20(_token);
    }

    /**
     * @dev Allows the owner to change the token address.
     * @param _token The new token address.
     */
    function setTokenAddress(address _token) external onlyOwner {
        token = IERC20(_token);
    }

    /** 
    * @dev Toggles the state of the `isClaimEnabled` variable. 
    * If claiming is currently enabled, it will be disabled, and vice versa.
    */
    function toggleClaim() external onlyOwner {
        isClaimEnabled = !isClaimEnabled;
    }


    /**
     * @dev Allows the owner to set the claim amounts for specific addresses.
     * @param recipients The list of addresses.
     * @param amounts The list of token amounts corresponding to each address.
     */
    function setClaimAmount(address[] memory recipients, uint256[] memory amounts) external onlyOwner {
        require(recipients.length == amounts.length, "Arrays must have the same length");
        for (uint256 i = 0; i < recipients.length; i++) 
            claimAmount[recipients[i]] = amounts[i];
    }

    /**
    * @dev Allows the owner to remove the claim amount for a specific address.
    * @param recipient The address whose claim amount should be removed.
    */
    function removeClaimAmount(address recipient) external onlyOwner {
        claimAmount[recipient] = 0;
    }

    /**
     * @dev Allows an address to claim their allotted tokens.
     */
    function claim() external nonReentrant {
        require(isClaimEnabled, "Claiming is currently disabled");

        uint256 amount = claimAmount[msg.sender];
        require(amount > 0, "No tokens to claim");

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

    /**
     * @dev Allows the owner to retrieve any tokens left in the contract.
     */
    function retrieveTokens() external onlyOwner {
        uint256 balance = token.balanceOf(address(this));
        require(balance > 0, "No tokens to retrieve");
        require(token.transfer(owner(), balance), "Transfer failed");
    }
}

File 2 of 4 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

    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
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

File 3 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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);
    }
}

File 4 of 4 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isClaimEnabled","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":"address","name":"recipient","type":"address"}],"name":"removeClaimAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retrieveTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"setClaimAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleClaim","outputs":[],"stateMutability":"nonpayable","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"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806381ae19701161007157806381ae19701461012c5780638da5cb5b1461013f578063d112974514610164578063f2fde38b1461016c578063f30e5b261461017f578063fc0c546a1461019c57600080fd5b806326a4e8d2146100b957806333fba250146100ce5780634e71d92d146100e1578063600d7003146100e9578063715018a6146100f157806378317be7146100f9575b600080fd5b6100cc6100c73660046107ae565b6101af565b005b6100cc6100dc3660046107ae565b6101d9565b6100cc6101fb565b6100cc61037e565b6100cc610512565b6101196101073660046107ae565b60036020526000908152604090205481565b6040519081526020015b60405180910390f35b6100cc61013a3660046108a6565b610524565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610123565b6100cc6105fd565b6100cc61017a3660046107ae565b610619565b60045461018c9060ff1681565b6040519015158152602001610123565b60025461014c906001600160a01b031681565b6101b761068f565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6101e161068f565b6001600160a01b0316600090815260036020526040812055565b6102036106e9565b60045460ff1661025a5760405162461bcd60e51b815260206004820152601e60248201527f436c61696d696e672069732063757272656e746c792064697361626c6564000060448201526064015b60405180910390fd5b33600090815260036020526040902054806102ac5760405162461bcd60e51b81526020600482015260126024820152714e6f20746f6b656e7320746f20636c61696d60701b6044820152606401610251565b3360008181526003602052604080822091909155600254905163a9059cbb60e01b81526004810192909252602482018390526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610310573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103349190610966565b6103725760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610251565b5061037c60018055565b565b61038661068f565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156103cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f39190610988565b90506000811161043d5760405162461bcd60e51b81526020600482015260156024820152744e6f20746f6b656e7320746f20726574726965766560581b6044820152606401610251565b6002546001600160a01b031663a9059cbb6104606000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af11580156104ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d19190610966565b61050f5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610251565b50565b61051a61068f565b61037c6000610742565b61052c61068f565b805182511461057d5760405162461bcd60e51b815260206004820181905260248201527f417272617973206d7573742068617665207468652073616d65206c656e6774686044820152606401610251565b60005b82518110156105f85781818151811061059b5761059b6109a1565b6020026020010151600360008584815181106105b9576105b96109a1565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000208190555080806105f0906109b7565b915050610580565b505050565b61060561068f565b6004805460ff19811660ff90911615179055565b61062161068f565b6001600160a01b0381166106865760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610251565b61050f81610742565b6000546001600160a01b0316331461037c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610251565b60026001540361073b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610251565b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b03811681146107a957600080fd5b919050565b6000602082840312156107c057600080fd5b6107c982610792565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561080f5761080f6107d0565b604052919050565b600067ffffffffffffffff821115610831576108316107d0565b5060051b60200190565b600082601f83011261084c57600080fd5b8135602061086161085c83610817565b6107e6565b82815260059290921b8401810191818101908684111561088057600080fd5b8286015b8481101561089b5780358352918301918301610884565b509695505050505050565b600080604083850312156108b957600080fd5b823567ffffffffffffffff808211156108d157600080fd5b818501915085601f8301126108e557600080fd5b813560206108f561085c83610817565b82815260059290921b8401810191818101908984111561091457600080fd5b948201945b838610156109395761092a86610792565b82529482019490820190610919565b9650508601359250508082111561094f57600080fd5b5061095c8582860161083b565b9150509250929050565b60006020828403121561097857600080fd5b815180151581146107c957600080fd5b60006020828403121561099a57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b6000600182016109d757634e487b7160e01b600052601160045260246000fd5b506001019056fea2646970667358221220771db4da8b88262b12e97a2779cab6ed314bbe4893394960569e2cd3c06c94d464736f6c63430008120033

Block Transaction 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
[ 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.