ETH Price: $2,287.97 (-5.86%)

Contract

0xc63c640b640038fb6cA3672dEF7494dEea58B9Cb

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Claim3958342562025-11-01 23:59:2592 days ago1762041565IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000870.01
Claim3945524102025-10-29 7:06:4996 days ago1761721609IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001050.01
Claim3942490862025-10-28 10:04:5096 days ago1761645890IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001040.01
Claim3937440712025-10-26 23:03:5498 days ago1761519834IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001050.01
Claim3934156332025-10-26 0:16:2199 days ago1761437781IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001050.01
Claim3918038772025-10-21 8:28:11104 days ago1761035291IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000880.01
Claim3918032312025-10-21 8:25:29104 days ago1761035129IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000880.01
Claim3918024842025-10-21 8:22:23104 days ago1761034943IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000890.01
Claim3915118462025-10-20 12:09:48104 days ago1760962188IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000880.01
Claim3912798832025-10-19 20:01:52105 days ago1760904112IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001010.01
Claim3912778232025-10-19 19:53:08105 days ago1760903588IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000890.01
Claim3912772852025-10-19 19:50:53105 days ago1760903453IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001060.01
Claim3909216102025-10-18 19:08:53106 days ago1760814533IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000910.01
Claim3899885532025-10-16 2:24:10109 days ago1760581450IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000950.01
Claim3899586892025-10-16 0:19:54109 days ago1760573994IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001590.017667
Claim3898664602025-10-15 17:56:19109 days ago1760550979IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001070.01
Claim3890415522025-10-13 8:45:26112 days ago1760345126IN
0xc63c640b...Eea58B9Cb
0 ETH0.000007520.072005
Claim3886825352025-10-12 7:51:43113 days ago1760255503IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000890.01
Claim3884652862025-10-11 16:48:05113 days ago1760201285IN
0xc63c640b...Eea58B9Cb
0 ETH0.000002150.019999
Claim3884046582025-10-11 12:36:11113 days ago1760186171IN
0xc63c640b...Eea58B9Cb
0 ETH0.000002750.025569
Claim3882179222025-10-10 23:39:59114 days ago1760139599IN
0xc63c640b...Eea58B9Cb
0 ETH0.000027560.2648
Claim3881515962025-10-10 19:03:55114 days ago1760123035IN
0xc63c640b...Eea58B9Cb
0 ETH0.000001520.014124
Claim3881065092025-10-10 15:56:34114 days ago1760111794IN
0xc63c640b...Eea58B9Cb
0 ETH0.000031740.275302
Claim3878822982025-10-10 0:24:24115 days ago1760055864IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000880.01
Claim3878345372025-10-09 21:05:24115 days ago1760043924IN
0xc63c640b...Eea58B9Cb
0 ETH0.000000970.01
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

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

Contract Name:
AirdropDistributor

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 100000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2023 WOO Network
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

// OpenZeppelin Contracts
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

// Uniswap Periphery
import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";

// Local Contracts
import {IAirdropDistributor} from "./interfaces/IAirdropDistributor.sol";
import {AdminOperation} from "./AdminOperation.sol";

contract AirdropDistributor is AdminOperation, IAirdropDistributor {
    /* ----- Variables ----- */

    address public immutable rewardToken;

    bytes32 public merkleRoot;

    mapping(address => uint256) public claimed;

    /* ----- Constructor ----- */

    constructor(address _rewardToken, ClaimedData[] memory alreadyClaimed) {
        rewardToken = _rewardToken;
        _emitClaimedEvents(alreadyClaimed);
    }

    /* ----- Functions ----- */

    function claim(
        uint256 index,
        address account,
        uint256 totalAmount,
        bytes32[] calldata merkleProof
    ) external whenNotPaused {
        if (claimed[account] >= totalAmount) {
            return;
        }

        bytes32 node = keccak256(abi.encodePacked(index, account, totalAmount));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), "AirdropDistributor: invalid proof");

        uint256 claimedAmount = totalAmount - claimed[account];
        claimed[account] += claimedAmount;
        TransferHelper.safeTransfer(rewardToken, account, claimedAmount);

        emit Claimed(account, claimedAmount, false);
    }

    function updateMerkleRoot(bytes32 newRoot) external onlyOwner {
        bytes32 oldRoot = merkleRoot;
        merkleRoot = newRoot;
        emit RootUpdated(oldRoot, newRoot);
    }

    function emitDistributionEvents(DistributionData[] calldata data) external onlyAdmin {
        uint256 len = data.length;
        unchecked {
            for (uint256 i = 0; i < len; ++i) {
                emit TokenAllocated(data[i].account, data[i].campaignId, data[i].amount);
            }
        }
    }

    function emitClaimedEvents(ClaimedData[] memory alreadyClaimed) external onlyAdmin {
        _emitClaimedEvents(alreadyClaimed);
    }

    function _emitClaimedEvents(ClaimedData[] memory alreadyClaimed) internal {
        uint256 len = alreadyClaimed.length;
        unchecked {
            for (uint256 i = 0; i < len; ++i) {
                emit Claimed(alreadyClaimed[i].account, alreadyClaimed[i].amount, true);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. 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 {
        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 (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (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;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
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 Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle 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++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }
    // uint256 = unsigned int
    // 0 - (2 ** 256 - 1)
    // 0x256*0
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';

library TransferHelper {
    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'STF');
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'ST');
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'SA');
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'STE');
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2023 WOO Network
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";

import {TransferHelper} from "@uniswap/v3-periphery/contracts/libraries/TransferHelper.sol";

abstract contract AdminOperation is Ownable, Pausable {
    /* ----- Events ----- */

    event AdminUpdated(address indexed account, bool flag);

    /* ----- Constants ----- */

    address public constant NATIVE_PLACEHOLDER = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /* ----- Variables ----- */

    mapping(address => bool) public isAdmin;

    /* ----- Modifiers ----- */

    modifier onlyAdmin() {
        require(_msgSender() == owner() || isAdmin[_msgSender()], "AdminOperation: not admin");
        _;
    }

    /* ----- Functions ----- */

    function inCaseTokenGotStuck(address token) external virtual onlyOwner {
        if (token == NATIVE_PLACEHOLDER) {
            TransferHelper.safeTransferETH(_msgSender(), address(this).balance);
        } else {
            uint256 amount = IERC20(token).balanceOf(address(this));
            TransferHelper.safeTransfer(token, _msgSender(), amount);
        }
    }

    function setAdmin(address account, bool flag) external virtual onlyOwner {
        isAdmin[account] = flag;
        emit AdminUpdated(account, flag);
    }

    function pause() public virtual onlyAdmin {
        _pause();
    }

    function unpause() public virtual onlyAdmin {
        _unpause();
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2023 WOO Network
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

interface IAirdropDistributor {
    /* ----- Structs ----- */

    struct DistributionData {
        address account;
        uint8 campaignId;
        uint256 amount;
    }

    struct ClaimedData {
        address account;
        uint256 amount;
    }

    /* ----- Events ----- */

    event Claimed(address indexed account, uint256 amount, bool indexed historic);

    event RootUpdated(bytes32 oldRoot, bytes32 indexed newRoot);

    event TokenAllocated(address indexed account, uint8 indexed campaignId, uint256 amount);

    /* ----- Functions ----- */

    function rewardToken() external view returns (address);

    function merkleRoot() external view returns (bytes32);

    function claimed(address account) external view returns (uint256 claimedAmount);

    function claim(uint256 index, address account, uint256 totalAmount, bytes32[] calldata merkleProof) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_rewardToken","type":"address"},{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IAirdropDistributor.ClaimedData[]","name":"alreadyClaimed","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"flag","type":"bool"}],"name":"AdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"bool","name":"historic","type":"bool"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"oldRoot","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"RootUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"uint8","name":"campaignId","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenAllocated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"NATIVE_PLACEHOLDER","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"totalAmount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IAirdropDistributor.ClaimedData[]","name":"alreadyClaimed","type":"tuple[]"}],"name":"emitClaimedEvents","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint8","name":"campaignId","type":"uint8"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IAirdropDistributor.DistributionData[]","name":"data","type":"tuple[]"}],"name":"emitDistributionEvents","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"inCaseTokenGotStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"flag","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]

0x60a06040523480156200001157600080fd5b506040516200196d3803806200196d8339810160408190526200003491620001f1565b6200003f336200006c565b6000805460ff60a01b191690556001600160a01b0382166080526200006481620000bc565b505062000300565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b805160005b818110156200015b5760011515838281518110620000e357620000e3620002ea565b6020026020010151600001516001600160a01b03167ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc8584815181106200012e576200012e620002ea565b6020026020010151602001516040516200014a91815260200190565b60405180910390a3600101620000c1565b505050565b80516001600160a01b03811681146200017857600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620001b857620001b86200017d565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620001e957620001e96200017d565b604052919050565b60008060408084860312156200020657600080fd5b620002118462000160565b602085810151919450906001600160401b03808211156200023157600080fd5b818701915087601f8301126200024657600080fd5b8151818111156200025b576200025b6200017d565b6200026b848260051b01620001be565b818152848101925060069190911b8301840190898211156200028c57600080fd5b928401925b81841015620002da5785848b031215620002ab5760008081fd5b620002b562000193565b620002c08562000160565b815284860151868201528352928501929184019162000291565b8096505050505050509250929050565b634e487b7160e01b600052603260045260246000fd5b60805161164a62000323600039600081816102b401526104b0015261164a6000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c8063715018a6116100b2578063c884ef8311610081578063f2fde38b11610066578063f2fde38b14610289578063f630ca0d1461029c578063f7c618c1146102af57600080fd5b8063c884ef8314610256578063e1a4e72a1461027657600080fd5b8063715018a6146102155780638456cb591461021d5780638da5cb5b14610225578063a2a348c61461024357600080fd5b80633f4ba83a116100ee5780633f4ba83a146101c45780634783f0ef146101cc5780634b0bddd2146101df5780635c975abb146101f257600080fd5b8063177b3eb41461012057806324d7806c146101655780632e7ba6ef146101985780632eb4a7ab146101ad575b600080fd5b61013b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101886101733660046111bb565b60016020526000908152604090205460ff1681565b604051901515815260200161015c565b6101ab6101a63660046111d6565b6102d6565b005b6101b660025481565b60405190815260200161015c565b6101ab61052e565b6101ab6101da36600461126d565b6105d3565b6101ab6101ed366004611294565b61061d565b60005474010000000000000000000000000000000000000000900460ff16610188565b6101ab6106a8565b6101ab6106ba565b60005473ffffffffffffffffffffffffffffffffffffffff1661013b565b6101ab610251366004611372565b61075d565b6101b66102643660046111bb565b60036020526000908152604090205481565b6101ab6102843660046111bb565b610804565b6101ab6102973660046111bb565b6108f5565b6101ab6102aa366004611446565b6109a9565b61013b7f000000000000000000000000000000000000000000000000000000000000000081565b6102de610b1d565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260409020548311156105275760408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b1691810191909152605481018490526000906074016040516020818303038152906040528051906020012090506103aa838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610ba2565b61043b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f41697264726f704469737472696275746f723a20696e76616c69642070726f6f60448201527f660000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604081205461046b90866114ea565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600360205260408120805492935083929091906104a5908490611501565b909155506104d690507f00000000000000000000000000000000000000000000000000000000000000008783610bb8565b60405181815260009073ffffffffffffffffffffffffffffffffffffffff8816907ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc9060200160405180910390a350505b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061056357503360009081526001602052604090205460ff165b6105c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b6105d1610d21565b565b6105db610d9e565b600280549082905560405181815282907f26df13263ccd588bd14d17b939ae977c1d51960da437d7eb886d1cfb6f3d0682906020015b60405180910390a25050565b610625610d9e565b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a111339101610611565b6106b0610d9e565b6105d16000610e1f565b60005473ffffffffffffffffffffffffffffffffffffffff163314806106ef57503360009081526001602052604090205460ff165b610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b6105d1610e94565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061079257503360009081526001602052604090205460ff165b6107f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b61080181610f03565b50565b61080c610d9e565b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff821601610853576108013347610fab565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa1580156108c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e49190611519565b90506108f1823383610bb8565b5050565b6108fd610d9e565b73ffffffffffffffffffffffffffffffffffffffff81166109a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610432565b61080181610e1f565b60005473ffffffffffffffffffffffffffffffffffffffff163314806109de57503360009081526001602052604090205460ff165b610a44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b8060005b81811015610b1757838382818110610a6257610a62611532565b9050606002016020016020810190610a7a9190611561565b60ff16848483818110610a8f57610a8f611532565b610aa592602060609092020190810191506111bb565b73ffffffffffffffffffffffffffffffffffffffff167f763dd4011ad9b904e442a2ee45676c7723d58948e248152dc50de948f16314c6868685818110610aee57610aee611532565b90506060020160400135604051610b0791815260200190565b60405180910390a3600101610a48565b50505050565b60005474010000000000000000000000000000000000000000900460ff16156105d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610432565b600082610baf858461108f565b14949350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691610c4f9190611584565b6000604051808303816000865af19150503d8060008114610c8c576040519150601f19603f3d011682016040523d82523d6000602084013e610c91565b606091505b5091509150818015610cbb575080511580610cbb575080806020019051810190610cbb91906115bf565b610527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f53540000000000000000000000000000000000000000000000000000000000006044820152606401610432565b610d296110dc565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610432565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e9c610b1d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d743390565b805160005b81811015610fa65760011515838281518110610f2657610f26611532565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff167ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc858481518110610f7b57610f7b611532565b602002602001015160200151604051610f9691815260200190565b60405180910390a3600101610f08565b505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8416908390604051610fe29190611584565b60006040518083038185875af1925050503d806000811461101f576040519150601f19603f3d011682016040523d82523d6000602084013e611024565b606091505b5050905080610fa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f53544500000000000000000000000000000000000000000000000000000000006044820152606401610432565b600081815b84518110156110d4576110c0828683815181106110b3576110b3611532565b6020026020010151611160565b9150806110cc816115dc565b915050611094565b509392505050565b60005474010000000000000000000000000000000000000000900460ff166105d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610432565b600081831061117c57600082815260208490526040902061118b565b60008381526020839052604090205b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146111b657600080fd5b919050565b6000602082840312156111cd57600080fd5b61118b82611192565b6000806000806000608086880312156111ee57600080fd5b853594506111fe60208701611192565b935060408601359250606086013567ffffffffffffffff8082111561122257600080fd5b818801915088601f83011261123657600080fd5b81358181111561124557600080fd5b8960208260051b850101111561125a57600080fd5b9699959850939650602001949392505050565b60006020828403121561127f57600080fd5b5035919050565b801515811461080157600080fd5b600080604083850312156112a757600080fd5b6112b083611192565b915060208301356112c081611286565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561131d5761131d6112cb565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561136a5761136a6112cb565b604052919050565b6000602080838503121561138557600080fd5b823567ffffffffffffffff8082111561139d57600080fd5b818501915085601f8301126113b157600080fd5b8135818111156113c3576113c36112cb565b6113d1848260051b01611323565b818152848101925060069190911b8301840190878211156113f157600080fd5b928401925b8184101561143b576040848903121561140f5760008081fd5b6114176112fa565b61142085611192565b815284860135868201528352604090930192918401916113f6565b979650505050505050565b6000806020838503121561145957600080fd5b823567ffffffffffffffff8082111561147157600080fd5b818501915085601f83011261148557600080fd5b81358181111561149457600080fd5b8660206060830285010111156114a957600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156114fc576114fc6114bb565b500390565b60008219821115611514576115146114bb565b500190565b60006020828403121561152b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561157357600080fd5b813560ff8116811461118b57600080fd5b6000825160005b818110156115a5576020818601810151858301520161158b565b818111156115b4576000828501525b509190910192915050565b6000602082840312156115d157600080fd5b815161118b81611286565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361160d5761160d6114bb565b506001019056fea2646970667358221220e14a56e10c7284ce2493db0839ff298126108c12fc36216d46311658e75622c664736f6c634300080e0033000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061011b5760003560e01c8063715018a6116100b2578063c884ef8311610081578063f2fde38b11610066578063f2fde38b14610289578063f630ca0d1461029c578063f7c618c1146102af57600080fd5b8063c884ef8314610256578063e1a4e72a1461027657600080fd5b8063715018a6146102155780638456cb591461021d5780638da5cb5b14610225578063a2a348c61461024357600080fd5b80633f4ba83a116100ee5780633f4ba83a146101c45780634783f0ef146101cc5780634b0bddd2146101df5780635c975abb146101f257600080fd5b8063177b3eb41461012057806324d7806c146101655780632e7ba6ef146101985780632eb4a7ab146101ad575b600080fd5b61013b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101886101733660046111bb565b60016020526000908152604090205460ff1681565b604051901515815260200161015c565b6101ab6101a63660046111d6565b6102d6565b005b6101b660025481565b60405190815260200161015c565b6101ab61052e565b6101ab6101da36600461126d565b6105d3565b6101ab6101ed366004611294565b61061d565b60005474010000000000000000000000000000000000000000900460ff16610188565b6101ab6106a8565b6101ab6106ba565b60005473ffffffffffffffffffffffffffffffffffffffff1661013b565b6101ab610251366004611372565b61075d565b6101b66102643660046111bb565b60036020526000908152604090205481565b6101ab6102843660046111bb565b610804565b6101ab6102973660046111bb565b6108f5565b6101ab6102aa366004611446565b6109a9565b61013b7f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b81565b6102de610b1d565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600360205260409020548311156105275760408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b1691810191909152605481018490526000906074016040516020818303038152906040528051906020012090506103aa838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610ba2565b61043b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f41697264726f704469737472696275746f723a20696e76616c69642070726f6f60448201527f660000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526003602052604081205461046b90866114ea565b73ffffffffffffffffffffffffffffffffffffffff87166000908152600360205260408120805492935083929091906104a5908490611501565b909155506104d690507f000000000000000000000000cafcd85d8ca7ad1e1c6f82f651fa15e33aefd07b8783610bb8565b60405181815260009073ffffffffffffffffffffffffffffffffffffffff8816907ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc9060200160405180910390a350505b5050505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061056357503360009081526001602052604090205460ff165b6105c9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b6105d1610d21565b565b6105db610d9e565b600280549082905560405181815282907f26df13263ccd588bd14d17b939ae977c1d51960da437d7eb886d1cfb6f3d0682906020015b60405180910390a25050565b610625610d9e565b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f235bc17e7930760029e9f4d860a2a8089976de5b381cf8380fc11c1d88a111339101610611565b6106b0610d9e565b6105d16000610e1f565b60005473ffffffffffffffffffffffffffffffffffffffff163314806106ef57503360009081526001602052604090205460ff165b610755576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b6105d1610e94565b60005473ffffffffffffffffffffffffffffffffffffffff1633148061079257503360009081526001602052604090205460ff165b6107f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b61080181610f03565b50565b61080c610d9e565b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff821601610853576108013347610fab565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa1580156108c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e49190611519565b90506108f1823383610bb8565b5050565b6108fd610d9e565b73ffffffffffffffffffffffffffffffffffffffff81166109a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610432565b61080181610e1f565b60005473ffffffffffffffffffffffffffffffffffffffff163314806109de57503360009081526001602052604090205460ff165b610a44576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f41646d696e4f7065726174696f6e3a206e6f742061646d696e000000000000006044820152606401610432565b8060005b81811015610b1757838382818110610a6257610a62611532565b9050606002016020016020810190610a7a9190611561565b60ff16848483818110610a8f57610a8f611532565b610aa592602060609092020190810191506111bb565b73ffffffffffffffffffffffffffffffffffffffff167f763dd4011ad9b904e442a2ee45676c7723d58948e248152dc50de948f16314c6868685818110610aee57610aee611532565b90506060020160400135604051610b0791815260200190565b60405180910390a3600101610a48565b50505050565b60005474010000000000000000000000000000000000000000900460ff16156105d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610432565b600082610baf858461108f565b14949350505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691610c4f9190611584565b6000604051808303816000865af19150503d8060008114610c8c576040519150601f19603f3d011682016040523d82523d6000602084013e610c91565b606091505b5091509150818015610cbb575080511580610cbb575080806020019051810190610cbb91906115bf565b610527576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600260248201527f53540000000000000000000000000000000000000000000000000000000000006044820152606401610432565b610d296110dc565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60005473ffffffffffffffffffffffffffffffffffffffff1633146105d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610432565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610e9c610b1d565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610d743390565b805160005b81811015610fa65760011515838281518110610f2657610f26611532565b60200260200101516000015173ffffffffffffffffffffffffffffffffffffffff167ffa8256f7c08bb01a03ea96f8b3a904a4450311c9725d1c52cdbe21ed3dc42dcc858481518110610f7b57610f7b611532565b602002602001015160200151604051610f9691815260200190565b60405180910390a3600101610f08565b505050565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8416908390604051610fe29190611584565b60006040518083038185875af1925050503d806000811461101f576040519150601f19603f3d011682016040523d82523d6000602084013e611024565b606091505b5050905080610fa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600360248201527f53544500000000000000000000000000000000000000000000000000000000006044820152606401610432565b600081815b84518110156110d4576110c0828683815181106110b3576110b3611532565b6020026020010151611160565b9150806110cc816115dc565b915050611094565b509392505050565b60005474010000000000000000000000000000000000000000900460ff166105d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610432565b600081831061117c57600082815260208490526040902061118b565b60008381526020839052604090205b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146111b657600080fd5b919050565b6000602082840312156111cd57600080fd5b61118b82611192565b6000806000806000608086880312156111ee57600080fd5b853594506111fe60208701611192565b935060408601359250606086013567ffffffffffffffff8082111561122257600080fd5b818801915088601f83011261123657600080fd5b81358181111561124557600080fd5b8960208260051b850101111561125a57600080fd5b9699959850939650602001949392505050565b60006020828403121561127f57600080fd5b5035919050565b801515811461080157600080fd5b600080604083850312156112a757600080fd5b6112b083611192565b915060208301356112c081611286565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040805190810167ffffffffffffffff8111828210171561131d5761131d6112cb565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561136a5761136a6112cb565b604052919050565b6000602080838503121561138557600080fd5b823567ffffffffffffffff8082111561139d57600080fd5b818501915085601f8301126113b157600080fd5b8135818111156113c3576113c36112cb565b6113d1848260051b01611323565b818152848101925060069190911b8301840190878211156113f157600080fd5b928401925b8184101561143b576040848903121561140f5760008081fd5b6114176112fa565b61142085611192565b815284860135868201528352604090930192918401916113f6565b979650505050505050565b6000806020838503121561145957600080fd5b823567ffffffffffffffff8082111561147157600080fd5b818501915085601f83011261148557600080fd5b81358181111561149457600080fd5b8660206060830285010111156114a957600080fd5b60209290920196919550909350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156114fc576114fc6114bb565b500390565b60008219821115611514576115146114bb565b500190565b60006020828403121561152b57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006020828403121561157357600080fd5b813560ff8116811461118b57600080fd5b6000825160005b818110156115a5576020818601810151858301520161158b565b818111156115b4576000828501525b509190910192915050565b6000602082840312156115d157600080fd5b815161118b81611286565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361160d5761160d6114bb565b506001019056fea2646970667358221220e14a56e10c7284ce2493db0839ff298126108c12fc36216d46311658e75622c664736f6c634300080e0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.