ETH Price: $3,409.05 (+4.63%)

Contract

0x01f3bCc12155908Af91D53a782A0211edba9179b
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim196390742024-04-12 10:56:35255 days ago1712919395IN
0x01f3bCc1...edba9179b
0 ETH0.0007710113.59117977
Claim195165022024-03-26 5:21:11272 days ago1711430471IN
0x01f3bCc1...edba9179b
0 ETH0.0006905417.42532211
Claim194289992024-03-13 22:07:23285 days ago1710367643IN
0x01f3bCc1...edba9179b
0 ETH0.0034604160.99910216
Claim193940802024-03-09 0:52:23290 days ago1709945543IN
0x01f3bCc1...edba9179b
0 ETH0.0024933543.95204035
Claim192629522024-02-19 16:25:47308 days ago1708359947IN
0x01f3bCc1...edba9179b
0 ETH0.0013128151.10634543
Claim192257862024-02-14 11:02:59313 days ago1707908579IN
0x01f3bCc1...edba9179b
0 ETH0.0011952721.06993443
Claim190966642024-01-27 8:15:35331 days ago1706343335IN
0x01f3bCc1...edba9179b
0 ETH0.0010890319.19710914
Claim190560822024-01-21 15:17:59337 days ago1705850279IN
0x01f3bCc1...edba9179b
0 ETH0.0014334725.26888826
Claim190051182024-01-14 12:26:35344 days ago1705235195IN
0x01f3bCc1...edba9179b
0 ETH0.0025268844.54301643
Claim189620872024-01-08 11:45:59350 days ago1704714359IN
0x01f3bCc1...edba9179b
0 ETH0.0010149817.89175783
Claim189347462024-01-04 15:04:59354 days ago1704380699IN
0x01f3bCc1...edba9179b
0 ETH0.0030660254.04685613
Claim188999272023-12-30 17:50:23359 days ago1703958623IN
0x01f3bCc1...edba9179b
0 ETH0.0025357444.69928105
Claim188692802023-12-26 10:29:23363 days ago1703586563IN
0x01f3bCc1...edba9179b
0 ETH0.001335423.54004543
Claim188500332023-12-23 17:35:23366 days ago1703352923IN
0x01f3bCc1...edba9179b
0 ETH0.0015462627.25710902
Claim188497392023-12-23 16:35:59366 days ago1703349359IN
0x01f3bCc1...edba9179b
0 ETH0.0015740427.74681789
Claim188485182023-12-23 12:28:59366 days ago1703334539IN
0x01f3bCc1...edba9179b
0 ETH0.001297722.87546189
Claim188457282023-12-23 3:05:11366 days ago1703300711IN
0x01f3bCc1...edba9179b
0 ETH0.0015019226.47536152
Claim188455882023-12-23 2:37:11366 days ago1703299031IN
0x01f3bCc1...edba9179b
0 ETH0.0014034424.73942815
Claim188453162023-12-23 1:42:23366 days ago1703295743IN
0x01f3bCc1...edba9179b
0 ETH0.001452825.60950182
Claim188453072023-12-23 1:40:35366 days ago1703295635IN
0x01f3bCc1...edba9179b
0 ETH0.0011345820
Claim188444822023-12-22 22:53:59367 days ago1703285639IN
0x01f3bCc1...edba9179b
0 ETH0.0015968928.14959667
Renounce Ownersh...188440312023-12-22 21:22:47367 days ago1703280167IN
0x01f3bCc1...edba9179b
0 ETH0.0010434837.18105344
Claim188434932023-12-22 19:34:11367 days ago1703273651IN
0x01f3bCc1...edba9179b
0 ETH0.0017676831.16020698
Claim188433852023-12-22 19:12:35367 days ago1703272355IN
0x01f3bCc1...edba9179b
0 ETH0.0020374235.91504217
Claim188432192023-12-22 18:38:47367 days ago1703270327IN
0x01f3bCc1...edba9179b
0 ETH0.0020331235.83931316
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:
TreeClaim

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
File 1 of 5 : TreeClaim.sol
// SPDX-License-Identifer: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/access/Ownable.sol";
import "@openzeppelin/interfaces/IERC20.sol";

contract TreeClaim is Ownable {

    bool public active = false;

    mapping(address => uint256) public claims;

    IERC20 immutable private TREE_TOKEN;
    
    constructor(address _addr) Ownable(msg.sender) {
        TREE_TOKEN = IERC20(_addr);
    }

    function addToClaims(address[] calldata _addrs, uint256[] calldata _claims) external onlyOwner {
        require(_addrs.length == _claims.length, "Array length mismatch");
        for (uint i = 0; i < _addrs.length; i++) {
            claims[_addrs[i]] = _claims[i];
        }
    }

    function removeFromClaims(address[] calldata _addrs) external onlyOwner {
        for (uint i = 0; i < _addrs.length; i++) {
            delete claims[_addrs[i]];
        }
    }

    function toggleClaims() external onlyOwner {
        active = !active;
    }

    function claim() external {
        require(active, "Claims aren't live");
        require(claims[msg.sender] > 0, "Not eligible to claim");
        uint256 _val = claims[msg.sender];
        claims[msg.sender] = 0;
        TREE_TOKEN.transfer(msg.sender, _val);
    }
}

File 2 of 5 : Ownable.sol
// 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);
    }
}

File 3 of 5 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (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;
    }
}

File 4 of 5 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";

File 5 of 5 : 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
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "remappings": [
    "@openzeppelin=.cache/OpenZeppelin/v5.0.0"
  ],
  "viaIR": false
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_addr","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"},{"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":"active","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addrs","type":"address[]"},{"internalType":"uint256[]","name":"_claims","type":"uint256[]"}],"name":"addToClaims","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claims","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addrs","type":"address[]"}],"name":"removeFromClaims","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleClaims","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a06040525f805460ff60a01b1916905534801561001b575f80fd5b5060405161074f38038061074f83398101604081905261003a916100c9565b338061005f57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100688161007a565b506001600160a01b03166080526100f6565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100d9575f80fd5b81516001600160a01b03811681146100ef575f80fd5b9392505050565b60805161064161010e5f395f61029801526106415ff3fe608060405234801561000f575f80fd5b5060043610610090575f3560e01c80638da5cb5b116100635780638da5cb5b146100e157806390d228f2146100fb578063921fb8691461010e578063c6788bdd14610116578063f2fde38b14610143575f80fd5b806302fb0c5e146100945780633c77190f146100bc5780634e71d92d146100d1578063715018a6146100d9575b5f80fd5b5f546100a790600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b6100cf6100ca366004610505565b610156565b005b6100cf6101ba565b6100cf610306565b5f546040516001600160a01b0390911681526020016100b3565b6100cf610109366004610544565b610319565b6100cf6103dd565b6101356101243660046105ab565b60016020525f908152604090205481565b6040519081526020016100b3565b6100cf6101513660046105ab565b610405565b61015e610442565b5f5b818110156101b55760015f84848481811061017d5761017d6105d8565b905060200201602081019061019291906105ab565b6001600160a01b0316815260208101919091526040015f90812055600101610160565b505050565b5f54600160a01b900460ff1661020c5760405162461bcd60e51b8152602060048201526012602482015271436c61696d73206172656e2774206c69766560701b60448201526064015b60405180910390fd5b335f9081526001602052604090205461025f5760405162461bcd60e51b81526020600482015260156024820152744e6f7420656c696769626c6520746f20636c61696d60581b6044820152606401610203565b335f8181526001602052604080822080549290555163a9059cbb60e01b8152600481019290925260248201819052906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016020604051808303815f875af11580156102de573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030291906105ec565b5050565b61030e610442565b6103175f61046e565b565b610321610442565b8281146103685760405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b6044820152606401610203565b5f5b838110156103d657828282818110610384576103846105d8565b9050602002013560015f8787858181106103a0576103a06105d8565b90506020020160208101906103b591906105ab565b6001600160a01b0316815260208101919091526040015f205560010161036a565b5050505050565b6103e5610442565b5f805460ff60a01b198116600160a01b9182900460ff1615909102179055565b61040d610442565b6001600160a01b03811661043657604051631e4fbdf760e01b81525f6004820152602401610203565b61043f8161046e565b50565b5f546001600160a01b031633146103175760405163118cdaa760e01b8152336004820152602401610203565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8083601f8401126104cd575f80fd5b50813567ffffffffffffffff8111156104e4575f80fd5b6020830191508360208260051b85010111156104fe575f80fd5b9250929050565b5f8060208385031215610516575f80fd5b823567ffffffffffffffff81111561052c575f80fd5b610538858286016104bd565b90969095509350505050565b5f805f8060408587031215610557575f80fd5b843567ffffffffffffffff8082111561056e575f80fd5b61057a888389016104bd565b90965094506020870135915080821115610592575f80fd5b5061059f878288016104bd565b95989497509550505050565b5f602082840312156105bb575f80fd5b81356001600160a01b03811681146105d1575f80fd5b9392505050565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156105fc575f80fd5b815180151581146105d1575f80fdfea26469706673582212200d8a5e14749699e22144b106550fc57ef90c368214c473a5c9eac6d827b2ea5d64736f6c63430008170033000000000000000000000000ba25b2281214300e4e649fead9a6d6acd25f1c0a

Deployed Bytecode

0x608060405234801561000f575f80fd5b5060043610610090575f3560e01c80638da5cb5b116100635780638da5cb5b146100e157806390d228f2146100fb578063921fb8691461010e578063c6788bdd14610116578063f2fde38b14610143575f80fd5b806302fb0c5e146100945780633c77190f146100bc5780634e71d92d146100d1578063715018a6146100d9575b5f80fd5b5f546100a790600160a01b900460ff1681565b60405190151581526020015b60405180910390f35b6100cf6100ca366004610505565b610156565b005b6100cf6101ba565b6100cf610306565b5f546040516001600160a01b0390911681526020016100b3565b6100cf610109366004610544565b610319565b6100cf6103dd565b6101356101243660046105ab565b60016020525f908152604090205481565b6040519081526020016100b3565b6100cf6101513660046105ab565b610405565b61015e610442565b5f5b818110156101b55760015f84848481811061017d5761017d6105d8565b905060200201602081019061019291906105ab565b6001600160a01b0316815260208101919091526040015f90812055600101610160565b505050565b5f54600160a01b900460ff1661020c5760405162461bcd60e51b8152602060048201526012602482015271436c61696d73206172656e2774206c69766560701b60448201526064015b60405180910390fd5b335f9081526001602052604090205461025f5760405162461bcd60e51b81526020600482015260156024820152744e6f7420656c696769626c6520746f20636c61696d60581b6044820152606401610203565b335f8181526001602052604080822080549290555163a9059cbb60e01b8152600481019290925260248201819052906001600160a01b037f000000000000000000000000ba25b2281214300e4e649fead9a6d6acd25f1c0a169063a9059cbb906044016020604051808303815f875af11580156102de573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030291906105ec565b5050565b61030e610442565b6103175f61046e565b565b610321610442565b8281146103685760405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b6044820152606401610203565b5f5b838110156103d657828282818110610384576103846105d8565b9050602002013560015f8787858181106103a0576103a06105d8565b90506020020160208101906103b591906105ab565b6001600160a01b0316815260208101919091526040015f205560010161036a565b5050505050565b6103e5610442565b5f805460ff60a01b198116600160a01b9182900460ff1615909102179055565b61040d610442565b6001600160a01b03811661043657604051631e4fbdf760e01b81525f6004820152602401610203565b61043f8161046e565b50565b5f546001600160a01b031633146103175760405163118cdaa760e01b8152336004820152602401610203565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f8083601f8401126104cd575f80fd5b50813567ffffffffffffffff8111156104e4575f80fd5b6020830191508360208260051b85010111156104fe575f80fd5b9250929050565b5f8060208385031215610516575f80fd5b823567ffffffffffffffff81111561052c575f80fd5b610538858286016104bd565b90969095509350505050565b5f805f8060408587031215610557575f80fd5b843567ffffffffffffffff8082111561056e575f80fd5b61057a888389016104bd565b90965094506020870135915080821115610592575f80fd5b5061059f878288016104bd565b95989497509550505050565b5f602082840312156105bb575f80fd5b81356001600160a01b03811681146105d1575f80fd5b9392505050565b634e487b7160e01b5f52603260045260245ffd5b5f602082840312156105fc575f80fd5b815180151581146105d1575f80fdfea26469706673582212200d8a5e14749699e22144b106550fc57ef90c368214c473a5c9eac6d827b2ea5d64736f6c63430008170033

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

000000000000000000000000ba25b2281214300e4e649fead9a6d6acd25f1c0a

-----Decoded View---------------
Arg [0] : _addr (address): 0xBa25B2281214300E4e649feAd9A6d6acD25f1c0a

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ba25b2281214300e4e649fead9a6d6acd25f1c0a


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.