ETH Price: $3,372.00 (-0.93%)

Contract

0xdf3BD4FD499cA916F32EB8aa64FAcc241cdc2411
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim149118772022-06-05 23:47:15956 days ago1654472835IN
0xdf3BD4FD...41cdc2411
0 ETH0.0046631649.62558392
Claim147753802022-05-14 19:16:03978 days ago1652555763IN
0xdf3BD4FD...41cdc2411
0 ETH0.003186133.9239962
Claim147748052022-05-14 17:06:25978 days ago1652547985IN
0xdf3BD4FD...41cdc2411
0 ETH0.0051742655.08467466
Claim147694062022-05-13 20:04:38979 days ago1652472278IN
0xdf3BD4FD...41cdc2411
0 ETH0.006600270.28294115
Claim147460142022-05-10 2:29:58982 days ago1652149798IN
0xdf3BD4FD...41cdc2411
0 ETH0.00702574.81125134
Claim146846332022-04-30 8:47:04992 days ago1651308424IN
0xdf3BD4FD...41cdc2411
0 ETH0.0032888835.00782995
Claim146846022022-04-30 8:40:58992 days ago1651308058IN
0xdf3BD4FD...41cdc2411
0 ETH0.0025617727.27463854
Claim146713192022-04-28 6:40:40994 days ago1651128040IN
0xdf3BD4FD...41cdc2411
0 ETH0.0024634326.22485227
Claim145670202022-04-11 22:22:151011 days ago1649715735IN
0xdf3BD4FD...41cdc2411
0 ETH0.0055663659.26390801
Claim145421682022-04-08 1:13:481015 days ago1649380428IN
0xdf3BD4FD...41cdc2411
0 ETH0.0053846757.34293076
Claim145237322022-04-05 4:17:391017 days ago1649132259IN
0xdf3BD4FD...41cdc2411
0 ETH0.0056338659.99150452
Claim145188382022-04-04 9:54:521018 days ago1649066092IN
0xdf3BD4FD...41cdc2411
0 ETH0.0041648744.35959548
Claim145171422022-04-04 3:32:211018 days ago1649043141IN
0xdf3BD4FD...41cdc2411
0 ETH0.0037981640.42962582
Claim145090252022-04-02 21:01:571020 days ago1648933317IN
0xdf3BD4FD...41cdc2411
0 ETH0.0067054771.41764267
Claim144864092022-03-30 8:08:101023 days ago1648627690IN
0xdf3BD4FD...41cdc2411
0 ETH0.0028430630.28370886
Claim144863162022-03-30 7:46:311023 days ago1648626391IN
0xdf3BD4FD...41cdc2411
0 ETH0.0025142226.76327052
Claim144688712022-03-27 14:46:221026 days ago1648392382IN
0xdf3BD4FD...41cdc2411
0 ETH0.0020705422.04509109
Claim144667512022-03-27 7:00:021026 days ago1648364402IN
0xdf3BD4FD...41cdc2411
0 ETH0.0020799522.14773242
Claim144621432022-03-26 13:40:291027 days ago1648302029IN
0xdf3BD4FD...41cdc2411
0 ETH0.002558227.24069314
Claim144560312022-03-25 14:40:011028 days ago1648219201IN
0xdf3BD4FD...41cdc2411
0 ETH0.0046397349.4109625
Claim144526032022-03-25 1:50:471028 days ago1648173047IN
0xdf3BD4FD...41cdc2411
0 ETH0.0041087943.75108463
Claim144514412022-03-24 21:40:581029 days ago1648158058IN
0xdf3BD4FD...41cdc2411
0 ETH0.0052612156.01033568
Claim144498252022-03-24 15:33:501029 days ago1648136030IN
0xdf3BD4FD...41cdc2411
0 ETH0.0062044866.06064442
Claim144445592022-03-23 19:51:371030 days ago1648065097IN
0xdf3BD4FD...41cdc2411
0 ETH0.0029331731.23024927
Claim144394092022-03-23 0:41:361031 days ago1647996096IN
0xdf3BD4FD...41cdc2411
0 ETH0.0027522629.30276291
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:
Claim

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : Claim.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract Claim is Ownable, ReentrancyGuard {
  bytes32 public ROOT;
  ERC20 public REWARD;

  constructor(address reward, bytes32 root) {
    ROOT = root;
    REWARD = ERC20(reward);
  }

  function verify(bytes32[] memory proof, bytes32 leaf)
    public
    view
    returns (bool)
  {
    return MerkleProof.verify(proof, ROOT, leaf);
  }

  mapping(address => bool) public claimedAddresses;

  function claim(uint256 amount, bytes32[] memory proof) public nonReentrant {
    require(claimedAddresses[msg.sender] == false, "Already claimed");
    require(
      verify(proof, keccak256(abi.encodePacked(amount, msg.sender))),
      "Not valid"
    );
    claimedAddresses[msg.sender] = true;
    REWARD.transfer(msg.sender, amount);
  }

  function setRoot(bytes32 _root) public onlyOwner {
    ROOT = _root;
  }

  function migrate() public onlyOwner {
    REWARD.transfer(owner(), REWARD.balanceOf(address(this)));
  }
}

File 2 of 8 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        return computedHash;
    }
}

File 3 of 8 : 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;
    }
}

File 4 of 8 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 5 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

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

File 6 of 8 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 7 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 8 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"reward","type":"address"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"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":"REWARD","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimedAddresses","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"},{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50604051610a03380380610a0383398101604081905261002f916100b4565b61003833610064565b60018055600255600380546001600160a01b0319166001600160a01b03929092169190911790556100ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100c757600080fd5b82516001600160a01b03811681146100de57600080fd5b6020939093015192949293505050565b610906806100fd6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063972a2a6211610066578063972a2a6214610109578063cab34c081461012c578063dab5f3401461013f578063f1429a9614610152578063f2fde38b1461017557600080fd5b80632f52ebb7146100a35780635909c12f146100b8578063715018a6146100d45780638da5cb5b146100dc5780638fd3ab8014610101575b600080fd5b6100b66100b1366004610753565b610188565b005b6100c160025481565b6040519081526020015b60405180910390f35b6100b6610356565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100cb565b6100b661038c565b61011c61011736600461079a565b6104b7565b60405190151581526020016100cb565b6003546100e9906001600160a01b031681565b6100b661014d3660046107df565b6104cd565b61011c6101603660046107f8565b60046020526000908152604090205460ff1681565b6100b66101833660046107f8565b6104fc565b600260015414156101e05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001553360009081526004602052604090205460ff16156102375760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016101d7565b61028481833360405160200161026992919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b604051602081830303815290604052805190602001206104b7565b6102bc5760405162461bcd60e51b8152602060048201526009602482015268139bdd081d985b1a5960ba1b60448201526064016101d7565b33600081815260046020819052604091829020805460ff19166001179055600354915163a9059cbb60e01b815290810192909252602482018490526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610329573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034d9190610821565b50506001805550565b6000546001600160a01b031633146103805760405162461bcd60e51b81526004016101d790610843565b61038a6000610590565b565b6000546001600160a01b031633146103b65760405162461bcd60e51b81526004016101d790610843565b6003546001600160a01b031663a9059cbb6103d96000546001600160a01b031690565b6003546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190610878565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b49190610821565b50565b60006104c683600254846105e0565b9392505050565b6000546001600160a01b031633146104f75760405162461bcd60e51b81526004016101d790610843565b600255565b6000546001600160a01b031633146105265760405162461bcd60e51b81526004016101d790610843565b6001600160a01b03811661058b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101d7565b6104b4815b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826105ed85846105f6565b14949350505050565b600081815b845181101561069a57600085828151811061061857610618610891565b6020026020010151905080831161065a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250610687565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610692816108a7565b9150506105fb565b509392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126106c957600080fd5b8135602067ffffffffffffffff808311156106e6576106e66106a2565b8260051b604051601f19603f8301168101818110848211171561070b5761070b6106a2565b60405293845285810183019383810192508785111561072957600080fd5b83870191505b848210156107485781358352918301919083019061072f565b979650505050505050565b6000806040838503121561076657600080fd5b82359150602083013567ffffffffffffffff81111561078457600080fd5b610790858286016106b8565b9150509250929050565b600080604083850312156107ad57600080fd5b823567ffffffffffffffff8111156107c457600080fd5b6107d0858286016106b8565b95602094909401359450505050565b6000602082840312156107f157600080fd5b5035919050565b60006020828403121561080a57600080fd5b81356001600160a01b03811681146104c657600080fd5b60006020828403121561083357600080fd5b815180151581146104c657600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561088a57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006000198214156108c957634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212201c67af9e9bccf59931afa497187f4ac8b8444e057277bc8ddeb6e16b7808d1e364736f6c634300080b0033000000000000000000000000710aa623c2c881b0d7357bcf9aeedf660e606c226e01d411390d14b31936b2eb28bf2452d187ca7d0455787edabe37ada4b20368

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063972a2a6211610066578063972a2a6214610109578063cab34c081461012c578063dab5f3401461013f578063f1429a9614610152578063f2fde38b1461017557600080fd5b80632f52ebb7146100a35780635909c12f146100b8578063715018a6146100d45780638da5cb5b146100dc5780638fd3ab8014610101575b600080fd5b6100b66100b1366004610753565b610188565b005b6100c160025481565b6040519081526020015b60405180910390f35b6100b6610356565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016100cb565b6100b661038c565b61011c61011736600461079a565b6104b7565b60405190151581526020016100cb565b6003546100e9906001600160a01b031681565b6100b661014d3660046107df565b6104cd565b61011c6101603660046107f8565b60046020526000908152604090205460ff1681565b6100b66101833660046107f8565b6104fc565b600260015414156101e05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001553360009081526004602052604090205460ff16156102375760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016101d7565b61028481833360405160200161026992919091825260601b6bffffffffffffffffffffffff1916602082015260340190565b604051602081830303815290604052805190602001206104b7565b6102bc5760405162461bcd60e51b8152602060048201526009602482015268139bdd081d985b1a5960ba1b60448201526064016101d7565b33600081815260046020819052604091829020805460ff19166001179055600354915163a9059cbb60e01b815290810192909252602482018490526001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610329573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061034d9190610821565b50506001805550565b6000546001600160a01b031633146103805760405162461bcd60e51b81526004016101d790610843565b61038a6000610590565b565b6000546001600160a01b031633146103b65760405162461bcd60e51b81526004016101d790610843565b6003546001600160a01b031663a9059cbb6103d96000546001600160a01b031690565b6003546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610421573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104459190610878565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610490573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104b49190610821565b50565b60006104c683600254846105e0565b9392505050565b6000546001600160a01b031633146104f75760405162461bcd60e51b81526004016101d790610843565b600255565b6000546001600160a01b031633146105265760405162461bcd60e51b81526004016101d790610843565b6001600160a01b03811661058b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101d7565b6104b4815b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826105ed85846105f6565b14949350505050565b600081815b845181101561069a57600085828151811061061857610618610891565b6020026020010151905080831161065a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250610687565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610692816108a7565b9150506105fb565b509392505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126106c957600080fd5b8135602067ffffffffffffffff808311156106e6576106e66106a2565b8260051b604051601f19603f8301168101818110848211171561070b5761070b6106a2565b60405293845285810183019383810192508785111561072957600080fd5b83870191505b848210156107485781358352918301919083019061072f565b979650505050505050565b6000806040838503121561076657600080fd5b82359150602083013567ffffffffffffffff81111561078457600080fd5b610790858286016106b8565b9150509250929050565b600080604083850312156107ad57600080fd5b823567ffffffffffffffff8111156107c457600080fd5b6107d0858286016106b8565b95602094909401359450505050565b6000602082840312156107f157600080fd5b5035919050565b60006020828403121561080a57600080fd5b81356001600160a01b03811681146104c657600080fd5b60006020828403121561083357600080fd5b815180151581146104c657600080fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561088a57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006000198214156108c957634e487b7160e01b600052601160045260246000fd5b506001019056fea26469706673582212201c67af9e9bccf59931afa497187f4ac8b8444e057277bc8ddeb6e16b7808d1e364736f6c634300080b0033

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

000000000000000000000000710aa623c2c881b0d7357bcf9aeedf660e606c226e01d411390d14b31936b2eb28bf2452d187ca7d0455787edabe37ada4b20368

-----Decoded View---------------
Arg [0] : reward (address): 0x710Aa623c2c881b0d7357bCf9aEedf660E606C22
Arg [1] : root (bytes32): 0x6e01d411390d14b31936b2eb28bf2452d187ca7d0455787edabe37ada4b20368

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000710aa623c2c881b0d7357bcf9aeedf660e606c22
Arg [1] : 6e01d411390d14b31936b2eb28bf2452d187ca7d0455787edabe37ada4b20368


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.