More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 660 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Retrieve Tokens | 47855049 | 578 days ago | IN | 0 POL | 0.00323135 | ||||
Toggle Claim | 47855033 | 578 days ago | IN | 0 POL | 0.00180252 | ||||
Claim | 47853553 | 578 days ago | IN | 0 POL | 0.0052029 | ||||
Claim | 47852937 | 578 days ago | IN | 0 POL | 0.00644281 | ||||
Claim | 47849253 | 578 days ago | IN | 0 POL | 0.00704749 | ||||
Claim | 47842224 | 578 days ago | IN | 0 POL | 0.0064047 | ||||
Claim | 47840631 | 579 days ago | IN | 0 POL | 0.00506689 | ||||
Claim | 47840405 | 579 days ago | IN | 0 POL | 0.00540784 | ||||
Claim | 47834397 | 579 days ago | IN | 0 POL | 0.00515506 | ||||
Claim | 47831865 | 579 days ago | IN | 0 POL | 0.00498624 | ||||
Claim | 47823987 | 579 days ago | IN | 0 POL | 0.00636931 | ||||
Claim | 47820449 | 579 days ago | IN | 0 POL | 0.00848813 | ||||
Claim | 47817362 | 579 days ago | IN | 0 POL | 0.00402821 | ||||
Set Claim Amount | 47811010 | 579 days ago | IN | 0 POL | 0.00769981 | ||||
Remove Claim Amo... | 47810977 | 579 days ago | IN | 0 POL | 0.00180512 | ||||
Remove Claim Amo... | 47810972 | 579 days ago | IN | 0 POL | 0.00340099 | ||||
Claim | 47808660 | 579 days ago | IN | 0 POL | 0.00413475 | ||||
Claim | 47802876 | 579 days ago | IN | 0 POL | 0.00572439 | ||||
Claim | 47802784 | 579 days ago | IN | 0 POL | 0.00560794 | ||||
Claim | 47801907 | 579 days ago | IN | 0 POL | 0.00300991 | ||||
Claim | 47800772 | 580 days ago | IN | 0 POL | 0.00653309 | ||||
Claim | 47800611 | 580 days ago | IN | 0 POL | 0.00514983 | ||||
Claim | 47800310 | 580 days ago | IN | 0 POL | 0.00684804 | ||||
Claim | 47800035 | 580 days ago | IN | 0 POL | 0.00527614 | ||||
Claim | 47794820 | 580 days ago | IN | 0 POL | 0.00550348 |
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
Contract Source Code (Solidity Standard Json-Input format)
// 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"); } }
// 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; } }
// 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); } }
// 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.