ETH Price: $3,899.54 (+0.02%)
Gas: 16 Gwei

Contract

0x6cA68adc7eC07a4bD97c97e8052510FBE6b67d10
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Claim198923742024-05-17 21:29:3510 days ago1715981375IN
0x6cA68adc...BE6b67d10
0 ETH0.000728273.34803851
Claim198345382024-05-09 19:20:3518 days ago1715282435IN
0x6cA68adc...BE6b67d10
0 ETH0.000120063.87611751
Claim198345332024-05-09 19:19:3518 days ago1715282375IN
0x6cA68adc...BE6b67d10
0 ETH0.000580074.08904822
Claim198122262024-05-06 16:27:1121 days ago1715012831IN
0x6cA68adc...BE6b67d10
0 ETH0.000696546
Claim198116572024-05-06 14:32:1121 days ago1715005931IN
0x6cA68adc...BE6b67d10
0 ETH0.0017885712.53415707
Claim197976492024-05-04 15:31:1123 days ago1714836671IN
0x6cA68adc...BE6b67d10
0 ETH0.001021656.15571502
Claim197899982024-05-03 13:51:1124 days ago1714744271IN
0x6cA68adc...BE6b67d10
0 ETH0.0016750611.80768116
Claim195825492024-04-04 12:58:2353 days ago1712235503IN
0x6cA68adc...BE6b67d10
0 ETH0.0034626324.26820867
Claim195814652024-04-04 9:19:2354 days ago1712222363IN
0x6cA68adc...BE6b67d10
0 ETH0.0037569119.50752837
Claim195410312024-03-29 17:06:3559 days ago1711731995IN
0x6cA68adc...BE6b67d10
0 ETH0.0056166433.67171431
Claim195173102024-03-26 8:04:5963 days ago1711440299IN
0x6cA68adc...BE6b67d10
0 ETH0.0007247423.02591314
Claim195173102024-03-26 8:04:5963 days ago1711440299IN
0x6cA68adc...BE6b67d10
0 ETH0.0032855223.02591314
Claim195000372024-03-23 21:42:3565 days ago1711230155IN
0x6cA68adc...BE6b67d10
0 ETH0.0024303117.02830696
Claim194997022024-03-23 20:34:1165 days ago1711226051IN
0x6cA68adc...BE6b67d10
0 ETH0.0018928516.07251019
Claim194798432024-03-21 1:41:2368 days ago1710985283IN
0x6cA68adc...BE6b67d10
0 ETH0.0038972631.02421445
Claim194786322024-03-20 21:37:3568 days ago1710970655IN
0x6cA68adc...BE6b67d10
0 ETH0.0087047345.19685657
Claim194699762024-03-19 16:27:1169 days ago1710865631IN
0x6cA68adc...BE6b67d10
0 ETH0.0061260742.92737613
Claim194482702024-03-16 15:13:2372 days ago1710602003IN
0x6cA68adc...BE6b67d10
0 ETH0.004833334.06615652
Claim194434472024-03-15 22:54:3573 days ago1710543275IN
0x6cA68adc...BE6b67d10
0 ETH0.0065730334.12970003
Claim194293342024-03-13 23:15:1175 days ago1710371711IN
0x6cA68adc...BE6b67d10
0 ETH0.0071246549.92397394
Claim194260292024-03-13 12:03:3575 days ago1710331415IN
0x6cA68adc...BE6b67d10
0 ETH0.0179802561.67970849
Claim193959262024-03-09 7:03:3580 days ago1709967815IN
0x6cA68adc...BE6b67d10
0 ETH0.0208506144.65353496
Claim193879552024-03-08 4:06:2381 days ago1709870783IN
0x6cA68adc...BE6b67d10
0 ETH0.0102448547.09932519
Claim193853702024-03-07 19:25:5981 days ago1709839559IN
0x6cA68adc...BE6b67d10
0 ETH0.0139760572.57726552
Claim193823752024-03-07 9:23:4782 days ago1709803427IN
0x6cA68adc...BE6b67d10
0 ETH0.0069389348.92707606
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:
DegenDistributor

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
File 1 of 9 : DegenDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.10;

import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import {IAddressProvider} from "@gearbox-protocol/core-v2/contracts/interfaces/IAddressProvider.sol";
import {IDegenNFT} from "@gearbox-protocol/core-v2/contracts/interfaces/IDegenNFT.sol";
import {IDegenDistributor} from "./IDegenDistributor.sol";

contract DegenDistributor is IDegenDistributor {
    /// @dev Emits each time when call not by treasury
    error TreasuryOnlyException();

    /// @dev Returns the token distributed by the contract
    IDegenNFT public immutable override degenNFT;

    /// @dev DAO Treasury address
    address public immutable treasury;

    /// @dev The current merkle root of total claimable balances
    bytes32 public override merkleRoot;

    /// @dev The mapping that stores amounts already claimed by users
    mapping(address => uint256) public claimed;

    modifier treasuryOnly() {
        if (msg.sender != treasury) revert TreasuryOnlyException();
        _;
    }

    constructor(
        address addressProvider,
        address degenNFT_,
        bytes32 merkleRoot_
    ) {
        degenNFT = IDegenNFT(degenNFT_);
        treasury = IAddressProvider(addressProvider).getTreasuryContract();
        merkleRoot = merkleRoot_;
    }

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

    function claim(
        uint256 index,
        address account,
        uint256 totalAmount,
        bytes32[] calldata merkleProof
    ) external override {
        require(
            claimed[account] < totalAmount,
            "MerkleDistributor: Nothing to claim"
        );

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

        uint256 claimedAmount = totalAmount - claimed[account];
        claimed[account] += claimedAmount;
        degenNFT.mint(account, claimedAmount);

        emit Claimed(account, claimedAmount);
    }
}

File 3 of 9 : IDegenDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.0;

import { IDegenNFT } from "@gearbox-protocol/core-v2/contracts/interfaces/IDegenNFT.sol";

interface IDegenDistributorEvents {
    /// @dev Emits when a user claims tokens
    event Claimed(
        address indexed account,
        uint256 amount
    );

    /// @dev Emits when the owner replaces the merkle root
    event RootUpdated(bytes32 oldRoot, bytes32 indexed newRoot);
}

interface IDegenDistributor is IDegenDistributorEvents {
    // Returns the address of the token distributed by this contract.
    function degenNFT() external view returns (IDegenNFT);

    // Returns the merkle root of the merkle tree containing account balances available to claim.
    function merkleRoot() external view returns (bytes32);

    /// @dev Returns the total amount of token claimed by the user
    function claimed(address user) external view returns (uint256);

    // Claim the given amount of the token to the given address. Reverts if the inputs are invalid.
    /// @dev Claims the remaining unclaimed amount of the token for the account. Reverts if the inputs are not a leaf in the tree
    ///      or the total claimed amount for the account is more than the leaf amount.
    function claim(
        uint256 index,
        address account,
        uint256 totalAmount,
        bytes32[] calldata merkleProof
    ) external;
}

File 4 of 9 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * 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.
 */
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 proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _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}
     *
     * _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 the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _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}
     *
     * _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 5 of 9 : IAddressProvider.sol
// SPDX-License-Identifier: MIT
// Gearbox Protocol. Generalized leverage for DeFi protocols
// (c) Gearbox Holdings, 2022
pragma solidity ^0.8.10;
import { IVersion } from "./IVersion.sol";

interface IAddressProviderEvents {
    /// @dev Emits when an address is set for a contract role
    event AddressSet(bytes32 indexed service, address indexed newAddress);
}

/// @title Optimised for front-end Address Provider interface
interface IAddressProvider is IAddressProviderEvents, IVersion {
    /// @return Address of ACL contract
    function getACL() external view returns (address);

    /// @return Address of ContractsRegister
    function getContractsRegister() external view returns (address);

    /// @return Address of AccountFactory
    function getAccountFactory() external view returns (address);

    /// @return Address of DataCompressor
    function getDataCompressor() external view returns (address);

    /// @return Address of GEAR token
    function getGearToken() external view returns (address);

    /// @return Address of WETH token
    function getWethToken() external view returns (address);

    /// @return Address of WETH Gateway
    function getWETHGateway() external view returns (address);

    /// @return Address of PriceOracle
    function getPriceOracle() external view returns (address);

    /// @return Address of DAO Treasury Multisig
    function getTreasuryContract() external view returns (address);

    /// @return Address of PathFinder
    function getLeveragedActions() external view returns (address);
}

File 6 of 9 : IDegenNFT.sol
// SPDX-License-Identifier: MIT
// Gearbox Protocol. Generalized leverage for DeFi protocols
// (c) Gearbox Holdings, 2022
pragma solidity ^0.8.10;
import { IVersion } from "./IVersion.sol";
import { IERC721Metadata } from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";

interface IDegenNFTExceptions {
    /// @dev Thrown if an access-restricted function was called by non-CreditFacade
    error CreditFacadeOrConfiguratorOnlyException();

    /// @dev Thrown if an access-restricted function was called by non-minter
    error MinterOnlyException();

    /// @dev Thrown if trying to add a burner address that is not a correct Credit Facade
    error InvalidCreditFacadeException();

    /// @dev Thrown if the account's balance is not sufficient for an action (usually a burn)
    error InsufficientBalanceException();
}

interface IDegenNFTEvents {
    /// @dev Minted when new minter set
    event NewMinterSet(address indexed);

    /// @dev Minted each time when new credit facade added
    event NewCreditFacadeAdded(address indexed);

    /// @dev Minted each time when new credit facade added
    event NewCreditFacadeRemoved(address indexed);
}

interface IDegenNFT is
    IDegenNFTExceptions,
    IDegenNFTEvents,
    IVersion,
    IERC721Metadata
{
    /// @dev address of the current minter
    function minter() external view returns (address);

    /// @dev Stores the total number of tokens on holder accounts
    function totalSupply() external view returns (uint256);

    /// @dev Stores the base URI for NFT metadata
    function baseURI() external view returns (string memory);

    /// @dev Mints a specified amount of tokens to the address
    /// @param to Address the tokens are minted to
    /// @param amount The number of tokens to mint
    function mint(address to, uint256 amount) external;

    /// @dev Burns a number of tokens from a specified address
    /// @param from The address a token will be burnt from
    /// @param amount The number of tokens to burn
    function burn(address from, uint256 amount) external;
}

File 7 of 9 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 8 of 9 : IVersion.sol
// SPDX-License-Identifier: MIT
// Gearbox Protocol. Generalized leverage for DeFi protocols
// (c) Gearbox Holdings, 2022
pragma solidity ^0.8.10;

/// @title IVersion
/// @dev Declares a version function which returns the contract's version
interface IVersion {
    /// @dev Returns contract version
    function version() external view returns (uint256);
}

File 9 of 9 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 10 of 9 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"addressProvider","type":"address"},{"internalType":"address","name":"degenNFT_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"TreasuryOnlyException","type":"error"},{"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":false,"internalType":"bytes32","name":"oldRoot","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"RootUpdated","type":"event"},{"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":[],"name":"degenNFT","outputs":[{"internalType":"contract IDegenNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b5060405161094338038061094383398101604081905261002f916100de565b816001600160a01b03166080816001600160a01b031681525050826001600160a01b03166326c74fc36040518163ffffffff1660e01b8152600401602060405180830381865afa158015610087573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ab919061011a565b6001600160a01b031660a0526000555061013c9050565b80516001600160a01b03811681146100d957600080fd5b919050565b6000806000606084860312156100f357600080fd5b6100fc846100c2565b925061010a602085016100c2565b9150604084015190509250925092565b60006020828403121561012c57600080fd5b610135826100c2565b9392505050565b60805160a0516107d561016e6000396000818160c001526104b801526000818161010c01526103eb01526107d56000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c806361d027b31161005057806361d027b3146100bb5780639408b63f14610107578063c884ef831461012e57600080fd5b80632e7ba6ef146100775780632eb4a7ab1461008c5780634783f0ef146100a8575b600080fd5b61008a61008536600461060e565b61014e565b005b61009560005481565b6040519081526020015b60405180910390f35b61008a6100b63660046106a5565b6104a0565b6100e27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161009f565b6100e27f000000000000000000000000000000000000000000000000000000000000000081565b61009561013c3660046106be565b60016020526000908152604090205481565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260409020548311610207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f723a204e6f7468696e6720746f20636c60448201527f61696d000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b1691810191909152605481018490526000906074016040516020818303038152906040528051906020012090506102a483838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052505492508591506105509050565b610330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f6660448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016101fe565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260408120546103609086610708565b73ffffffffffffffffffffffffffffffffffffffff871660009081526001602052604081208054929350839290919061039a90849061071f565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561042f57600080fd5b505af1158015610443573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8260405161048f91815260200190565b60405180910390a250505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461050f576040517febd1c66d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080549082905560405181815282907f26df13263ccd588bd14d17b939ae977c1d51960da437d7eb886d1cfb6f3d06829060200160405180910390a25050565b60008261055d8584610566565b14949350505050565b600081815b84518110156105ab576105978286838151811061058a5761058a610737565b60200260200101516105b3565b9150806105a381610766565b91505061056b565b509392505050565b60008183106105cf5760008281526020849052604090206105de565b60008381526020839052604090205b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461060957600080fd5b919050565b60008060008060006080868803121561062657600080fd5b85359450610636602087016105e5565b935060408601359250606086013567ffffffffffffffff8082111561065a57600080fd5b818801915088601f83011261066e57600080fd5b81358181111561067d57600080fd5b8960208260051b850101111561069257600080fd5b9699959850939650602001949392505050565b6000602082840312156106b757600080fd5b5035919050565b6000602082840312156106d057600080fd5b6105de826105e5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561071a5761071a6106d9565b500390565b60008219821115610732576107326106d9565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610798576107986106d9565b506001019056fea264697066735822122027a6a814b22b4311c35c6f3729d3d6f35812606b9fb2ab949131c32298fbf4ec64736f6c634300080a0033000000000000000000000000cf64698aff7e5f27a11dff868af228653ba53be0000000000000000000000000b829a5b349b01fc71afe46e50dd6ec0222a6e5996577a1bb31fedcabf222cf94bb872b8f8712def1045f77014f19ab1f4437a3b8

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100725760003560e01c806361d027b31161005057806361d027b3146100bb5780639408b63f14610107578063c884ef831461012e57600080fd5b80632e7ba6ef146100775780632eb4a7ab1461008c5780634783f0ef146100a8575b600080fd5b61008a61008536600461060e565b61014e565b005b61009560005481565b6040519081526020015b60405180910390f35b61008a6100b63660046106a5565b6104a0565b6100e27f0000000000000000000000007b065fcb0760df0cea8cfd144e08554f3cea73d181565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161009f565b6100e27f000000000000000000000000b829a5b349b01fc71afe46e50dd6ec0222a6e59981565b61009561013c3660046106be565b60016020526000908152604090205481565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600160205260409020548311610207576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f4d65726b6c654469737472696275746f723a204e6f7468696e6720746f20636c60448201527f61696d000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60408051602081018790527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b1691810191909152605481018490526000906074016040516020818303038152906040528051906020012090506102a483838080602002602001604051908101604052809392919081815260200183836020028082843760009201829052505492508591506105509050565b610330576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f6660448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084016101fe565b73ffffffffffffffffffffffffffffffffffffffff85166000908152600160205260408120546103609086610708565b73ffffffffffffffffffffffffffffffffffffffff871660009081526001602052604081208054929350839290919061039a90849061071f565b90915550506040517f40c10f1900000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8781166004830152602482018390527f000000000000000000000000b829a5b349b01fc71afe46e50dd6ec0222a6e59916906340c10f1990604401600060405180830381600087803b15801561042f57600080fd5b505af1158015610443573d6000803e3d6000fd5b505050508573ffffffffffffffffffffffffffffffffffffffff167fd8138f8a3f377c5259ca548e70e4c2de94f129f5a11036a15b69513cba2b426a8260405161048f91815260200190565b60405180910390a250505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000007b065fcb0760df0cea8cfd144e08554f3cea73d1161461050f576040517febd1c66d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080549082905560405181815282907f26df13263ccd588bd14d17b939ae977c1d51960da437d7eb886d1cfb6f3d06829060200160405180910390a25050565b60008261055d8584610566565b14949350505050565b600081815b84518110156105ab576105978286838151811061058a5761058a610737565b60200260200101516105b3565b9150806105a381610766565b91505061056b565b509392505050565b60008183106105cf5760008281526020849052604090206105de565b60008381526020839052604090205b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461060957600080fd5b919050565b60008060008060006080868803121561062657600080fd5b85359450610636602087016105e5565b935060408601359250606086013567ffffffffffffffff8082111561065a57600080fd5b818801915088601f83011261066e57600080fd5b81358181111561067d57600080fd5b8960208260051b850101111561069257600080fd5b9699959850939650602001949392505050565b6000602082840312156106b757600080fd5b5035919050565b6000602082840312156106d057600080fd5b6105de826105e5565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561071a5761071a6106d9565b500390565b60008219821115610732576107326106d9565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610798576107986106d9565b506001019056fea264697066735822122027a6a814b22b4311c35c6f3729d3d6f35812606b9fb2ab949131c32298fbf4ec64736f6c634300080a0033

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

000000000000000000000000cf64698aff7e5f27a11dff868af228653ba53be0000000000000000000000000b829a5b349b01fc71afe46e50dd6ec0222a6e5996577a1bb31fedcabf222cf94bb872b8f8712def1045f77014f19ab1f4437a3b8

-----Decoded View---------------
Arg [0] : addressProvider (address): 0xcF64698AFF7E5f27A11dff868AF228653ba53be0
Arg [1] : degenNFT_ (address): 0xB829a5b349b01fc71aFE46E50dD6Ec0222A6E599
Arg [2] : merkleRoot_ (bytes32): 0x6577a1bb31fedcabf222cf94bb872b8f8712def1045f77014f19ab1f4437a3b8

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000cf64698aff7e5f27a11dff868af228653ba53be0
Arg [1] : 000000000000000000000000b829a5b349b01fc71afe46e50dd6ec0222a6e599
Arg [2] : 6577a1bb31fedcabf222cf94bb872b8f8712def1045f77014f19ab1f4437a3b8


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.