ETH Price: $3,414.13 (+3.08%)

Contract

0x397f588Afa6ac70c5B7F742294655f2CEADAf4B5
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Rewards212501922024-11-23 11:38:2310 hrs ago1732361903IN
0x397f588A...CEADAf4B5
0 ETH0.0012267310.42535873
Claim Rewards212301082024-11-20 16:21:593 days ago1732119719IN
0x397f588A...CEADAf4B5
0 ETH0.0021342921.83708434
Claim Rewards211742622024-11-12 21:22:3511 days ago1731446555IN
0x397f588A...CEADAf4B5
0 ETH0.0041099534.93136657
Claim Rewards210243452024-10-22 23:17:1131 days ago1729639031IN
0x397f588A...CEADAf4B5
0 ETH0.000444335.32330487
Claim Rewards210237732024-10-22 21:22:1132 days ago1729632131IN
0x397f588A...CEADAf4B5
0 ETH0.000949028.06883145
Claim Rewards210100632024-10-20 23:26:3533 days ago1729466795IN
0x397f588A...CEADAf4B5
0 ETH0.000810796.89478626
Claim Rewards210071702024-10-20 13:44:2334 days ago1729431863IN
0x397f588A...CEADAf4B5
0 ETH0.0011119513.32481125
Claim Rewards207464402024-09-14 4:23:2370 days ago1726287803IN
0x397f588A...CEADAf4B5
0 ETH0.000198121.6837731
Claim Rewards206143592024-08-26 17:48:1189 days ago1724694491IN
0x397f588A...CEADAf4B5
0 ETH0.00021413.22799652
Claim Rewards205906052024-08-23 10:08:3592 days ago1724407715IN
0x397f588A...CEADAf4B5
0 ETH0.000142471.21088949
Claim Rewards205861732024-08-22 19:15:5993 days ago1724354159IN
0x397f588A...CEADAf4B5
0 ETH0.000121831.24639275
Claim Rewards205310122024-08-15 2:20:59100 days ago1723688459IN
0x397f588A...CEADAf4B5
0 ETH0.000181232.73103753
Claim Rewards205005082024-08-10 20:09:11105 days ago1723320551IN
0x397f588A...CEADAf4B5
0 ETH0.000221141.87983979
Claim Rewards204754272024-08-07 8:13:23108 days ago1723018403IN
0x397f588A...CEADAf4B5
0 ETH0.000169472.55432062
Claim Rewards204371652024-08-02 0:05:35113 days ago1722557135IN
0x397f588A...CEADAf4B5
0 ETH0.000379214.5455607
Claim Rewards204152302024-07-29 22:31:59117 days ago1722292319IN
0x397f588A...CEADAf4B5
0 ETH0.000123121.8555314
Claim Rewards204102322024-07-29 5:49:47117 days ago1722232187IN
0x397f588A...CEADAf4B5
0 ETH0.000140062.11213482
Claim Rewards203868642024-07-25 23:32:47120 days ago1721950367IN
0x397f588A...CEADAf4B5
0 ETH0.00017982.15478454
Claim Rewards203168982024-07-16 5:11:59130 days ago1721106719IN
0x397f588A...CEADAf4B5
0 ETH0.000569134.83801545
Claim Rewards202901072024-07-12 11:25:23134 days ago1720783523IN
0x397f588A...CEADAf4B5
0 ETH0.000181621.80632999
Claim Rewards202644852024-07-08 21:32:47138 days ago1720474367IN
0x397f588A...CEADAf4B5
0 ETH0.000342412.90996781
Claim Rewards202556492024-07-07 15:52:35139 days ago1720367555IN
0x397f588A...CEADAf4B5
0 ETH0.000236022.34742666
Claim Rewards202510892024-07-07 0:35:11139 days ago1720312511IN
0x397f588A...CEADAf4B5
0 ETH0.000137751.170784
Claim Rewards202419352024-07-05 17:55:47141 days ago1720202147IN
0x397f588A...CEADAf4B5
0 ETH0.000559586.70482937
Claim Rewards202351892024-07-04 19:19:23142 days ago1720120763IN
0x397f588A...CEADAf4B5
0 ETH0.000848927.39164193
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:
CoinDistributor

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : CoinDistributor.sol
pragma solidity ^0.8.18;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract CoinDistributor is Ownable {
    event Claimed(address indexed account, uint256 amount);
    event DistributionCreated(uint256 indexed version, uint256 amount);

    mapping(address => uint256) public TOTAL_CLAIMED;
    bytes32 public merkleRoot;

    // Added versioning
    uint256 public currentVersion;
    mapping(address => uint256) public lastClaimedVersion;

    address erc20token; //EXAMPLE ADDRESS - CHANGE

    // Admins enumerable set
    using EnumerableSet for EnumerableSet.AddressSet;
    EnumerableSet.AddressSet private admins;

    constructor(address _token) {
        erc20token = _token;
        admins.add(msg.sender);
    }

    // Modifier to check if the caller is an admin
    modifier onlyAdmin() {
        require(isAdmin(msg.sender), "Caller is not an admin");
        _;
    }

    function isAdmin(address _account) public view returns (bool) {
        return admins.contains(_account);
    }

    function addAdmin(address[] memory _account) external onlyOwner {
        for (uint i = 0; i < _account.length; i++) {
            admins.add(_account[i]);
        }
    }

    function removeAdmin(address[] memory _account) external onlyOwner {
        for (uint i = 0; i < _account.length; i++) {
            admins.remove(_account[i]);
        }
    }

    function claimRewards(
        uint256 _amount,
        bytes32[] calldata _merkleProof
    ) external {
        // Ensure the user is claiming for the current version
        require(
            lastClaimedVersion[msg.sender] < currentVersion,
            "Already claimed for this version."
        );

        bytes32 leaf = keccak256(abi.encodePacked(msg.sender, _amount));
        require(
            MerkleProof.verify(_merkleProof, merkleRoot, leaf),
            "Invalid Merkle Proof."
        );

        TOTAL_CLAIMED[msg.sender] += _amount;
        lastClaimedVersion[msg.sender] = currentVersion; // Update their claimed version
        IERC20(erc20token).transfer(msg.sender, _amount);

        emit Claimed(msg.sender, _amount);
    }

    function createDistribution(
        bytes32 _merkleRoot,
        uint256 _amount
    ) external onlyAdmin {
        merkleRoot = _merkleRoot;
        currentVersion++;
        IERC20(erc20token).transferFrom(msg.sender, address(this), _amount);

        emit DistributionCreated(currentVersion, _amount);
    }

    function withdraw(uint256 amount) external onlyOwner {
        IERC20(erc20token).transfer(msg.sender, amount);
    }

    function setTokenAddress(address _token) external onlyOwner {
        erc20token = _token;
    }
}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

File 4 of 6 : 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 5 of 6 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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 rebuild 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 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 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 for 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) {
            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 rebuild 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 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 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 for 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) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[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)
        }
    }
}

File 6 of 6 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"version","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DistributionCreated","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"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"TOTAL_CLAIMED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_account","type":"address[]"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"createDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimedVersion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address[]","name":"_account","type":"address[]"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001a7d38038062001a7d8339818101604052810190620000379190620002c6565b620000576200004b620000bb60201b60201c565b620000c360201b60201c565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000b33360066200018760201b620009821790919060201c565b5050620002f8565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000620001b7836000018373ffffffffffffffffffffffffffffffffffffffff1660001b620001bf60201b60201c565b905092915050565b6000620001d383836200023960201b60201c565b6200022e57826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905062000233565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200028e8262000261565b9050919050565b620002a08162000281565b8114620002ac57600080fd5b50565b600081519050620002c08162000295565b92915050565b600060208284031215620002df57620002de6200025c565b5b6000620002ef84828501620002af565b91505092915050565b61177580620003086000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063abd40e1e11610066578063abd40e1e14610223578063ae876f611461023f578063d48a21cd1461025b578063f2fde38b1461028b576100ea565b80638da5cb5b146101cb57806399b2f6a7146101e95780639d888e8614610205576100ea565b80632eb4a7ab116100c85780632eb4a7ab146101575780633d0950a8146101755780633e1ec42814610191578063715018a6146101c1576100ea565b806324d7806c146100ef57806326a4e8d21461011f5780632e1a7d4d1461013b575b600080fd5b61010960048036038101906101049190610e24565b6102a7565b6040516101169190610e6c565b60405180910390f35b61013960048036038101906101349190610e24565b6102c4565b005b61015560048036038101906101509190610ebd565b610310565b005b61015f6103bc565b60405161016c9190610f03565b60405180910390f35b61018f600480360381019061018a9190611077565b6103c2565b005b6101ab60048036038101906101a69190610e24565b61041c565b6040516101b891906110cf565b60405180910390f35b6101c9610434565b005b6101d3610448565b6040516101e091906110f9565b60405180910390f35b61020360048036038101906101fe9190611140565b610471565b005b61020d6105b9565b60405161021a91906110cf565b60405180910390f35b61023d600480360381019061023891906111db565b6105bf565b005b61025960048036038101906102549190611077565b61088d565b005b61027560048036038101906102709190610e24565b6108e7565b60405161028291906110cf565b60405180910390f35b6102a560048036038101906102a09190610e24565b6108ff565b005b60006102bd8260066109b290919063ffffffff16565b9050919050565b6102cc6109e2565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6103186109e2565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b815260040161037592919061123b565b6020604051808303816000875af1158015610394573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b89190611290565b5050565b60025481565b6103ca6109e2565b60005b8151811015610418576104048282815181106103ec576103eb6112bd565b5b6020026020010151600661098290919063ffffffff16565b5080806104109061131b565b9150506103cd565b5050565b60046020528060005260406000206000915090505481565b61043c6109e2565b6104466000610a60565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61047a336102a7565b6104b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b0906113c0565b60405180910390fd5b81600281905550600360008154809291906104d39061131b565b9190505550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401610537939291906113e0565b6020604051808303816000875af1158015610556573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057a9190611290565b506003547f6aecc0a97ed8436da25295877eadc9bdfcb38d8d2cd93ce7b51765d2eaac9ff2826040516105ad91906110cf565b60405180910390a25050565b60035481565b600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063990611489565b60405180910390fd5b60003384604051602001610657929190611512565b6040516020818303038152906040528051906020012090506106bd838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060025483610b24565b6106fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f39061158a565b60405180910390fd5b83600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461074b91906115aa565b92505081905550600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff1660e01b81526004016107f592919061123b565b6020604051808303816000875af1158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190611290565b503373ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8560405161087f91906110cf565b60405180910390a250505050565b6108956109e2565b60005b81518110156108e3576108cf8282815181106108b7576108b66112bd565b5b60200260200101516006610b3b90919063ffffffff16565b5080806108db9061131b565b915050610898565b5050565b60016020528060005260406000206000915090505481565b6109076109e2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610976576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096d90611650565b60405180910390fd5b61097f81610a60565b50565b60006109aa836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610b6b565b905092915050565b60006109da836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610bdb565b905092915050565b6109ea610bfe565b73ffffffffffffffffffffffffffffffffffffffff16610a08610448565b73ffffffffffffffffffffffffffffffffffffffff1614610a5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a55906116bc565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600082610b318584610c06565b1490509392505050565b6000610b63836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610c5c565b905092915050565b6000610b778383610bdb565b610bd0578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050610bd5565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b600033905090565b60008082905060005b8451811015610c5157610c3c82868381518110610c2f57610c2e6112bd565b5b6020026020010151610d70565b91508080610c499061131b565b915050610c0f565b508091505092915050565b60008083600101600084815260200190815260200160002054905060008114610d64576000600182610c8e91906116dc565b9050600060018660000180549050610ca691906116dc565b9050818114610d15576000866000018281548110610cc757610cc66112bd565b5b9060005260206000200154905080876000018481548110610ceb57610cea6112bd565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480610d2957610d28611710565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d6a565b60009150505b92915050565b6000818310610d8857610d838284610d9b565b610d93565b610d928383610d9b565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610df182610dc6565b9050919050565b610e0181610de6565b8114610e0c57600080fd5b50565b600081359050610e1e81610df8565b92915050565b600060208284031215610e3a57610e39610dbc565b5b6000610e4884828501610e0f565b91505092915050565b60008115159050919050565b610e6681610e51565b82525050565b6000602082019050610e816000830184610e5d565b92915050565b6000819050919050565b610e9a81610e87565b8114610ea557600080fd5b50565b600081359050610eb781610e91565b92915050565b600060208284031215610ed357610ed2610dbc565b5b6000610ee184828501610ea8565b91505092915050565b6000819050919050565b610efd81610eea565b82525050565b6000602082019050610f186000830184610ef4565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f6c82610f23565b810181811067ffffffffffffffff82111715610f8b57610f8a610f34565b5b80604052505050565b6000610f9e610db2565b9050610faa8282610f63565b919050565b600067ffffffffffffffff821115610fca57610fc9610f34565b5b602082029050602081019050919050565b600080fd5b6000610ff3610fee84610faf565b610f94565b9050808382526020820190506020840283018581111561101657611015610fdb565b5b835b8181101561103f578061102b8882610e0f565b845260208401935050602081019050611018565b5050509392505050565b600082601f83011261105e5761105d610f1e565b5b813561106e848260208601610fe0565b91505092915050565b60006020828403121561108d5761108c610dbc565b5b600082013567ffffffffffffffff8111156110ab576110aa610dc1565b5b6110b784828501611049565b91505092915050565b6110c981610e87565b82525050565b60006020820190506110e460008301846110c0565b92915050565b6110f381610de6565b82525050565b600060208201905061110e60008301846110ea565b92915050565b61111d81610eea565b811461112857600080fd5b50565b60008135905061113a81611114565b92915050565b6000806040838503121561115757611156610dbc565b5b60006111658582860161112b565b925050602061117685828601610ea8565b9150509250929050565b600080fd5b60008083601f84011261119b5761119a610f1e565b5b8235905067ffffffffffffffff8111156111b8576111b7611180565b5b6020830191508360208202830111156111d4576111d3610fdb565b5b9250929050565b6000806000604084860312156111f4576111f3610dbc565b5b600061120286828701610ea8565b935050602084013567ffffffffffffffff81111561122357611222610dc1565b5b61122f86828701611185565b92509250509250925092565b600060408201905061125060008301856110ea565b61125d60208301846110c0565b9392505050565b61126d81610e51565b811461127857600080fd5b50565b60008151905061128a81611264565b92915050565b6000602082840312156112a6576112a5610dbc565b5b60006112b48482850161127b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061132682610e87565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611358576113576112ec565b5b600182019050919050565b600082825260208201905092915050565b7f43616c6c6572206973206e6f7420616e2061646d696e00000000000000000000600082015250565b60006113aa601683611363565b91506113b582611374565b602082019050919050565b600060208201905081810360008301526113d98161139d565b9050919050565b60006060820190506113f560008301866110ea565b61140260208301856110ea565b61140f60408301846110c0565b949350505050565b7f416c726561647920636c61696d656420666f7220746869732076657273696f6e60008201527f2e00000000000000000000000000000000000000000000000000000000000000602082015250565b6000611473602183611363565b915061147e82611417565b604082019050919050565b600060208201905081810360008301526114a281611466565b9050919050565b60008160601b9050919050565b60006114c1826114a9565b9050919050565b60006114d3826114b6565b9050919050565b6114eb6114e682610de6565b6114c8565b82525050565b6000819050919050565b61150c61150782610e87565b6114f1565b82525050565b600061151e82856114da565b60148201915061152e82846114fb565b6020820191508190509392505050565b7f496e76616c6964204d65726b6c652050726f6f662e0000000000000000000000600082015250565b6000611574601583611363565b915061157f8261153e565b602082019050919050565b600060208201905081810360008301526115a381611567565b9050919050565b60006115b582610e87565b91506115c083610e87565b92508282019050808211156115d8576115d76112ec565b5b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061163a602683611363565b9150611645826115de565b604082019050919050565b600060208201905081810360008301526116698161162d565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116a6602083611363565b91506116b182611670565b602082019050919050565b600060208201905081810360008301526116d581611699565b9050919050565b60006116e782610e87565b91506116f283610e87565b925082820390508181111561170a576117096112ec565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220ace2ed045c3e1331d71a6a54916116a9d4fd8332b68551a422b39278b6067f2664736f6c634300081200330000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638da5cb5b1161008c578063abd40e1e11610066578063abd40e1e14610223578063ae876f611461023f578063d48a21cd1461025b578063f2fde38b1461028b576100ea565b80638da5cb5b146101cb57806399b2f6a7146101e95780639d888e8614610205576100ea565b80632eb4a7ab116100c85780632eb4a7ab146101575780633d0950a8146101755780633e1ec42814610191578063715018a6146101c1576100ea565b806324d7806c146100ef57806326a4e8d21461011f5780632e1a7d4d1461013b575b600080fd5b61010960048036038101906101049190610e24565b6102a7565b6040516101169190610e6c565b60405180910390f35b61013960048036038101906101349190610e24565b6102c4565b005b61015560048036038101906101509190610ebd565b610310565b005b61015f6103bc565b60405161016c9190610f03565b60405180910390f35b61018f600480360381019061018a9190611077565b6103c2565b005b6101ab60048036038101906101a69190610e24565b61041c565b6040516101b891906110cf565b60405180910390f35b6101c9610434565b005b6101d3610448565b6040516101e091906110f9565b60405180910390f35b61020360048036038101906101fe9190611140565b610471565b005b61020d6105b9565b60405161021a91906110cf565b60405180910390f35b61023d600480360381019061023891906111db565b6105bf565b005b61025960048036038101906102549190611077565b61088d565b005b61027560048036038101906102709190610e24565b6108e7565b60405161028291906110cf565b60405180910390f35b6102a560048036038101906102a09190610e24565b6108ff565b005b60006102bd8260066109b290919063ffffffff16565b9050919050565b6102cc6109e2565b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6103186109e2565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b815260040161037592919061123b565b6020604051808303816000875af1158015610394573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103b89190611290565b5050565b60025481565b6103ca6109e2565b60005b8151811015610418576104048282815181106103ec576103eb6112bd565b5b6020026020010151600661098290919063ffffffff16565b5080806104109061131b565b9150506103cd565b5050565b60046020528060005260406000206000915090505481565b61043c6109e2565b6104466000610a60565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61047a336102a7565b6104b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b0906113c0565b60405180910390fd5b81600281905550600360008154809291906104d39061131b565b9190505550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401610537939291906113e0565b6020604051808303816000875af1158015610556573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057a9190611290565b506003547f6aecc0a97ed8436da25295877eadc9bdfcb38d8d2cd93ce7b51765d2eaac9ff2826040516105ad91906110cf565b60405180910390a25050565b60035481565b600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610642576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161063990611489565b60405180910390fd5b60003384604051602001610657929190611512565b6040516020818303038152906040528051906020012090506106bd838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505060025483610b24565b6106fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106f39061158a565b60405180910390fd5b83600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461074b91906115aa565b92505081905550600354600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33866040518363ffffffff1660e01b81526004016107f592919061123b565b6020604051808303816000875af1158015610814573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108389190611290565b503373ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8560405161087f91906110cf565b60405180910390a250505050565b6108956109e2565b60005b81518110156108e3576108cf8282815181106108b7576108b66112bd565b5b60200260200101516006610b3b90919063ffffffff16565b5080806108db9061131b565b915050610898565b5050565b60016020528060005260406000206000915090505481565b6109076109e2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610976576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096d90611650565b60405180910390fd5b61097f81610a60565b50565b60006109aa836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610b6b565b905092915050565b60006109da836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610bdb565b905092915050565b6109ea610bfe565b73ffffffffffffffffffffffffffffffffffffffff16610a08610448565b73ffffffffffffffffffffffffffffffffffffffff1614610a5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a55906116bc565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600082610b318584610c06565b1490509392505050565b6000610b63836000018373ffffffffffffffffffffffffffffffffffffffff1660001b610c5c565b905092915050565b6000610b778383610bdb565b610bd0578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050610bd5565b600090505b92915050565b600080836001016000848152602001908152602001600020541415905092915050565b600033905090565b60008082905060005b8451811015610c5157610c3c82868381518110610c2f57610c2e6112bd565b5b6020026020010151610d70565b91508080610c499061131b565b915050610c0f565b508091505092915050565b60008083600101600084815260200190815260200160002054905060008114610d64576000600182610c8e91906116dc565b9050600060018660000180549050610ca691906116dc565b9050818114610d15576000866000018281548110610cc757610cc66112bd565b5b9060005260206000200154905080876000018481548110610ceb57610cea6112bd565b5b90600052602060002001819055508387600101600083815260200190815260200160002081905550505b85600001805480610d2957610d28611710565b5b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610d6a565b60009150505b92915050565b6000818310610d8857610d838284610d9b565b610d93565b610d928383610d9b565b5b905092915050565b600082600052816020526040600020905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610df182610dc6565b9050919050565b610e0181610de6565b8114610e0c57600080fd5b50565b600081359050610e1e81610df8565b92915050565b600060208284031215610e3a57610e39610dbc565b5b6000610e4884828501610e0f565b91505092915050565b60008115159050919050565b610e6681610e51565b82525050565b6000602082019050610e816000830184610e5d565b92915050565b6000819050919050565b610e9a81610e87565b8114610ea557600080fd5b50565b600081359050610eb781610e91565b92915050565b600060208284031215610ed357610ed2610dbc565b5b6000610ee184828501610ea8565b91505092915050565b6000819050919050565b610efd81610eea565b82525050565b6000602082019050610f186000830184610ef4565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f6c82610f23565b810181811067ffffffffffffffff82111715610f8b57610f8a610f34565b5b80604052505050565b6000610f9e610db2565b9050610faa8282610f63565b919050565b600067ffffffffffffffff821115610fca57610fc9610f34565b5b602082029050602081019050919050565b600080fd5b6000610ff3610fee84610faf565b610f94565b9050808382526020820190506020840283018581111561101657611015610fdb565b5b835b8181101561103f578061102b8882610e0f565b845260208401935050602081019050611018565b5050509392505050565b600082601f83011261105e5761105d610f1e565b5b813561106e848260208601610fe0565b91505092915050565b60006020828403121561108d5761108c610dbc565b5b600082013567ffffffffffffffff8111156110ab576110aa610dc1565b5b6110b784828501611049565b91505092915050565b6110c981610e87565b82525050565b60006020820190506110e460008301846110c0565b92915050565b6110f381610de6565b82525050565b600060208201905061110e60008301846110ea565b92915050565b61111d81610eea565b811461112857600080fd5b50565b60008135905061113a81611114565b92915050565b6000806040838503121561115757611156610dbc565b5b60006111658582860161112b565b925050602061117685828601610ea8565b9150509250929050565b600080fd5b60008083601f84011261119b5761119a610f1e565b5b8235905067ffffffffffffffff8111156111b8576111b7611180565b5b6020830191508360208202830111156111d4576111d3610fdb565b5b9250929050565b6000806000604084860312156111f4576111f3610dbc565b5b600061120286828701610ea8565b935050602084013567ffffffffffffffff81111561122357611222610dc1565b5b61122f86828701611185565b92509250509250925092565b600060408201905061125060008301856110ea565b61125d60208301846110c0565b9392505050565b61126d81610e51565b811461127857600080fd5b50565b60008151905061128a81611264565b92915050565b6000602082840312156112a6576112a5610dbc565b5b60006112b48482850161127b565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061132682610e87565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611358576113576112ec565b5b600182019050919050565b600082825260208201905092915050565b7f43616c6c6572206973206e6f7420616e2061646d696e00000000000000000000600082015250565b60006113aa601683611363565b91506113b582611374565b602082019050919050565b600060208201905081810360008301526113d98161139d565b9050919050565b60006060820190506113f560008301866110ea565b61140260208301856110ea565b61140f60408301846110c0565b949350505050565b7f416c726561647920636c61696d656420666f7220746869732076657273696f6e60008201527f2e00000000000000000000000000000000000000000000000000000000000000602082015250565b6000611473602183611363565b915061147e82611417565b604082019050919050565b600060208201905081810360008301526114a281611466565b9050919050565b60008160601b9050919050565b60006114c1826114a9565b9050919050565b60006114d3826114b6565b9050919050565b6114eb6114e682610de6565b6114c8565b82525050565b6000819050919050565b61150c61150782610e87565b6114f1565b82525050565b600061151e82856114da565b60148201915061152e82846114fb565b6020820191508190509392505050565b7f496e76616c6964204d65726b6c652050726f6f662e0000000000000000000000600082015250565b6000611574601583611363565b915061157f8261153e565b602082019050919050565b600060208201905081810360008301526115a381611567565b9050919050565b60006115b582610e87565b91506115c083610e87565b92508282019050808211156115d8576115d76112ec565b5b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061163a602683611363565b9150611645826115de565b604082019050919050565b600060208201905081810360008301526116698161162d565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116a6602083611363565b91506116b182611670565b602082019050919050565b600060208201905081810360008301526116d581611699565b9050919050565b60006116e782610e87565b91506116f283610e87565b925082820390508181111561170a576117096112ec565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220ace2ed045c3e1331d71a6a54916116a9d4fd8332b68551a422b39278b6067f2664736f6c63430008120033

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

0000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381

-----Decoded View---------------
Arg [0] : _token (address): 0x4d224452801ACEd8B2F0aebE155379bb5D594381

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004d224452801aced8b2f0aebe155379bb5d594381


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.