ETH Price: $2,407.02 (+0.12%)

Contract

0x8f775b85481146D88ced819F95B44c38F333617B
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim Panda Toke...180728882023-09-05 21:15:23365 days ago1693948523IN
0x8f775b85...8F333617B
0 ETH0.0068947847.82036694
Claim Panda Toke...177169612023-07-18 1:51:23415 days ago1689645083IN
0x8f775b85...8F333617B
0 ETH0.0019640213.62342069
Claim Panda Toke...176363322023-07-06 17:37:23426 days ago1688665043IN
0x8f775b85...8F333617B
0 ETH0.0034040623.74554438
Claim Panda Toke...171246642023-04-25 17:08:59498 days ago1682442539IN
0x8f775b85...8F333617B
0 ETH0.0091362963.35363386
Claim Panda Toke...169890552023-04-06 10:40:23518 days ago1680777623IN
0x8f775b85...8F333617B
0 ETH0.0037397929.42150716
Claim Panda Toke...169551492023-04-01 15:20:59522 days ago1680362459IN
0x8f775b85...8F333617B
0 ETH0.0037284529.34012298
Claim Panda Toke...169524202023-04-01 6:07:11523 days ago1680329231IN
0x8f775b85...8F333617B
0 ETH0.0028576919.82514882
Claim Panda Toke...167144422023-02-26 19:19:35556 days ago1677439175IN
0x8f775b85...8F333617B
0 ETH0.003500824.28129581
Claim Panda Toke...166615102023-02-19 8:40:23564 days ago1676796023IN
0x8f775b85...8F333617B
0 ETH0.0029166923.1
Claim Panda Toke...166210492023-02-13 16:32:23569 days ago1676305943IN
0x8f775b85...8F333617B
0 ETH0.0054381342.79466386
Claim Panda Toke...163192022023-01-02 12:51:11612 days ago1672663871IN
0x8f775b85...8F333617B
0 ETH0.0025743417.85
Claim Panda Toke...162773272022-12-27 16:38:47617 days ago1672159127IN
0x8f775b85...8F333617B
0 ETH0.0036154525.07617289
Claim Panda Toke...160672832022-11-28 8:27:11647 days ago1669624031IN
0x8f775b85...8F333617B
0 ETH0.0009510910.2414929
Claim Panda Toke...160584692022-11-27 2:55:47648 days ago1669517747IN
0x8f775b85...8F333617B
0 ETH0.0017193611.92454044
Claim Panda Toke...159943422022-11-18 3:54:47657 days ago1668743687IN
0x8f775b85...8F333617B
0 ETH0.001968213.65
Claim Panda Toke...159735272022-11-15 6:04:23660 days ago1668492263IN
0x8f775b85...8F333617B
0 ETH0.0019066315
Claim Panda Toke...159727852022-11-15 3:35:35660 days ago1668483335IN
0x8f775b85...8F333617B
0 ETH0.0047146932.70349156
Claim Panda Toke...159704272022-11-14 19:40:11660 days ago1668454811IN
0x8f775b85...8F333617B
0 ETH0.0028020922.05
Claim Panda Toke...159481132022-11-11 16:57:59663 days ago1668185879IN
0x8f775b85...8F333617B
0 ETH0.0040026731.5
Claim Panda Toke...158560102022-10-29 20:10:59676 days ago1667074259IN
0x8f775b85...8F333617B
0 ETH0.0021004422.61244809
Claim Panda Toke...158502662022-10-29 0:53:11677 days ago1667004791IN
0x8f775b85...8F333617B
0 ETH0.0009665510.40211151
Claim Panda Toke...158228492022-10-25 4:56:23681 days ago1666673783IN
0x8f775b85...8F333617B
0 ETH0.0017827912.36346159
Claim Panda Toke...158162482022-10-24 6:43:11682 days ago1666593791IN
0x8f775b85...8F333617B
0 ETH0.0016800111.65225196
Claim Panda Toke...157810332022-10-19 8:43:35687 days ago1666169015IN
0x8f775b85...8F333617B
0 ETH0.0018633514.65930017
Claim Panda Toke...157723052022-10-18 3:28:23688 days ago1666063703IN
0x8f775b85...8F333617B
0 ETH0.0016244114.76892715
View all transactions

Latest 14 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
156105662022-09-25 13:04:23711 days ago1664111063
0x8f775b85...8F333617B
0.07816203 ETH
154478552022-08-31 17:12:02735 days ago1661965922
0x8f775b85...8F333617B
0.05660426 ETH
154477902022-08-31 16:56:14735 days ago1661964974
0x8f775b85...8F333617B
0.05660426 ETH
152516382022-07-31 17:40:27766 days ago1659289227
0x8f775b85...8F333617B
0.20971827 ETH
152479322022-07-31 3:48:25767 days ago1659239305
0x8f775b85...8F333617B
0.20971827 ETH
150455332022-06-29 14:56:50798 days ago1656514610
0x8f775b85...8F333617B
0.2 ETH
150455032022-06-29 14:47:52798 days ago1656514072
0x8f775b85...8F333617B
0.2 ETH
148797982022-05-31 16:43:34827 days ago1654015414
0x8f775b85...8F333617B
0.19675215 ETH
148795852022-05-31 15:52:28827 days ago1654012348
0x8f775b85...8F333617B
0.44169549 ETH
148795662022-05-31 15:48:46827 days ago1654012126
0x8f775b85...8F333617B
0.71581403 ETH
147425232022-05-09 12:50:17850 days ago1652100617
0x8f775b85...8F333617B
0.50042696 ETH
147423212022-05-09 12:03:58850 days ago1652097838
0x8f775b85...8F333617B
0.18594028 ETH
147422952022-05-09 11:59:12850 days ago1652097552
0x8f775b85...8F333617B
0.0148371 ETH
147414082022-05-09 8:31:51850 days ago1652085111
0x8f775b85...8F333617B
0.702 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PandaClaim

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 8 : PandaClaim.sol
/*
 **                                                                                                                                                              
 **                                                                   dddddddd                                                                                   
 **  PPPPPPPPPPPPPPPPP                                                d::::::d                  DDDDDDDDDDDDD                  AAA                 OOOOOOOOO     
 **  P::::::::::::::::P                                               d::::::d                  D::::::::::::DDD              A:::A              OO:::::::::OO   
 **  P::::::PPPPPP:::::P                                              d::::::d                  D:::::::::::::::DD           A:::::A           OO:::::::::::::OO 
 **  PP:::::P     P:::::P                                             d:::::d                   DDD:::::DDDDD:::::D         A:::::::A         O:::::::OOO:::::::O
 **    P::::P     P:::::Paaaaaaaaaaaaa  nnnn  nnnnnnnn        ddddddddd:::::d   aaaaaaaaaaaaa     D:::::D    D:::::D       A:::::::::A        O::::::O   O::::::O
 **    P::::P     P:::::Pa::::::::::::a n:::nn::::::::nn    dd::::::::::::::d   a::::::::::::a    D:::::D     D:::::D     A:::::A:::::A       O:::::O     O:::::O
 **    P::::PPPPPP:::::P aaaaaaaaa:::::an::::::::::::::nn  d::::::::::::::::d   aaaaaaaaa:::::a   D:::::D     D:::::D    A:::::A A:::::A      O:::::O     O:::::O
 **    P:::::::::::::PP           a::::ann:::::::::::::::nd:::::::ddddd:::::d            a::::a   D:::::D     D:::::D   A:::::A   A:::::A     O:::::O     O:::::O
 **    P::::PPPPPPPPP      aaaaaaa:::::a  n:::::nnnn:::::nd::::::d    d:::::d     aaaaaaa:::::a   D:::::D     D:::::D  A:::::A     A:::::A    O:::::O     O:::::O
 **    P::::P            aa::::::::::::a  n::::n    n::::nd:::::d     d:::::d   aa::::::::::::a   D:::::D     D:::::D A:::::AAAAAAAAA:::::A   O:::::O     O:::::O
 **    P::::P           a::::aaaa::::::a  n::::n    n::::nd:::::d     d:::::d  a::::aaaa::::::a   D:::::D     D:::::DA:::::::::::::::::::::A  O:::::O     O:::::O
 **    P::::P          a::::a    a:::::a  n::::n    n::::nd:::::d     d:::::d a::::a    a:::::a   D:::::D    D:::::DA:::::AAAAAAAAAAAAA:::::A O::::::O   O::::::O
 **  PP::::::PP        a::::a    a:::::a  n::::n    n::::nd::::::ddddd::::::dda::::a    a:::::a DDD:::::DDDDD:::::DA:::::A             A:::::AO:::::::OOO:::::::O
 **  P::::::::P        a:::::aaaa::::::a  n::::n    n::::n d:::::::::::::::::da:::::aaaa::::::a D:::::::::::::::DDA:::::A               A:::::AOO:::::::::::::OO 
 **  P::::::::P         a::::::::::aa:::a n::::n    n::::n  d:::::::::ddd::::d a::::::::::aa:::aD::::::::::::DDD A:::::A                 A:::::A OO:::::::::OO   
 **  PPPPPPPPPP          aaaaaaaaaa  aaaa nnnnnn    nnnnnn   ddddddddd   ddddd  aaaaaaaaaa  aaaaDDDDDDDDDDDDD   AAAAAAA                   AAAAAAA  OOOOOOOOO     
 **  
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";


contract PandaClaim is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    
    address public immutable pandaToken;
    address public usdToken;
    mapping(address => uint256) public claimRecord;
    mapping(address => uint256) public pandaClaimSum;
    mapping(address => uint256) public usdClaimSum;
    mapping(address => uint256) public etherClaimSum;
    uint256 public claimCycle;
    bool public claimOpen;
    // bytes32 public merkleRoot;
    bytes32 public merkleRoot;
    uint256 public totalClaimPanda;
    uint256 public totalClaimUsd;
    uint256 public totalClaimEth;

    address public constant ZERO_ADDRESS = address(0);

    event MerkleRootChanged(bytes32 merkleRoot);
    event UsdTokenChanged(address usdToken);
    event ClaimPanda(address indexed claimant, uint256 amount, uint256 sumAmount, uint256 etherAmount, uint256 etherSumAmount, uint256 usdAmount, uint256 usdSumAmount);
    event WithdrawERC20(address recipient, address tokenAddress, uint256 tokenAmount);
    event WithdrawEther(address recipient, uint256 amount);
    event ClaimOpenChange(bool open);

    /**
     * ErrorCode:
     * PE1:PandaDAO:Zero address
     * PE2:PandaDAO:claim zore tokens!
     * PE3:PandaDAO:same _merkleRoot
     * PE4:PandaDAO:same usd Token!
     * PE5:PandaDAO:Valid claimCycle required.
     * PE6:PandaDAO:PandaCliam dont have enough $PANDA.
     * PE7:PandaDAO:Valid panda proof required.
     * PE8:PandaDAO:PandaDAO:claim close!
     * PE9:PandaDAO:transfer ether fail!
     * PE10:PandaDAO:invalid arguements
     * PE11:PandaDAO:withdrawEther fail!
     * PE12:PandaDAO: PandaDAO:claim open same
     * PE13:PandaDAO:PandaCliam dont have enough $ETH.
     * PE14:PandaDAO:PandaCliam dont have enough $USD.
     */

    modifier notZeroAddr(address addr_) {
        require(addr_ != ZERO_ADDRESS, "PE1");
        _;
    }



    /**
     * @dev Constructor.
     */
    constructor(
        address _pandaToken,
        address _usdToken
    )
    {
        pandaToken = _pandaToken;
        usdToken = _usdToken;
    }


    /**
     * @dev Claims  tokens.
     * @param amount The amount of panda.
     * @param etherAmount The amount of ether.
     * @param usdAmount The amount of usd.
     * @param merkleProof A merkle proof proving the claim is valid.
     */
    function claimPandaTokens(uint256 amount, uint256 etherAmount, uint256 usdAmount, bytes32[] calldata merkleProof) external nonReentrant {
        require(claimOpen, "PE8");
        //claimCycle check
        require(claimRecord[msg.sender] < claimCycle, "PE5");
        require(amount + etherAmount + usdAmount > 0, "PE2");

        //balance check
        require(IERC20(pandaToken).balanceOf(address(this)) >= amount, "PE6");
        require(address(this).balance >= etherAmount, "PE13");
        require(IERC20(usdToken).balanceOf(address(this)) >= usdAmount, "PE14");
        //merkle check
        bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount, etherAmount, usdAmount));
        bool valid = MerkleProof.verify(merkleProof, merkleRoot, leaf);
        require(valid, "PE7");
        //update claimCycle
        claimRecord[msg.sender] = claimCycle;

        //transfer token
        if(amount > 0) {
            IERC20(pandaToken).safeTransfer(msg.sender, amount);
        }
        if (etherAmount > 0) {
            (bool success,) = msg.sender.call{value:etherAmount}("");
            require(success, "PE9");
        }
        if (usdAmount > 0) {
            IERC20(usdToken).safeTransfer(msg.sender, usdAmount);
        }
        
        pandaClaimSum[msg.sender] += amount;
        etherClaimSum[msg.sender] += etherAmount;
        usdClaimSum[msg.sender] += usdAmount;
        totalClaimPanda += amount;
        totalClaimEth += etherAmount;
        totalClaimUsd += usdAmount;
        emit ClaimPanda(msg.sender, amount, pandaClaimSum[msg.sender], etherAmount, etherClaimSum[msg.sender], usdAmount, usdClaimSum[msg.sender]);
    }




    /**
     * @dev Sets the merkle root. Only callable if the root is not yet set.
     * @param _merkleRoot tokens claim merkle tree.
     */
    function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        merkleRoot = _merkleRoot;
        claimCycle++;
        emit MerkleRootChanged(_merkleRoot);
    }

    /**
     * @dev update the merkle root.
     * @param _merkleRoot tokens claim merkle tree.
     */
    function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
        require(merkleRoot != _merkleRoot, "PE3");
        merkleRoot = _merkleRoot;
        emit MerkleRootChanged(_merkleRoot);
    }

    /**
     * @dev set Usd Token Address
     * @param _token token address
     */
    function setUsdToken(address _token) external onlyOwner notZeroAddr(_token) {
        require(usdToken != _token, "PE4");
        usdToken = _token;
        emit UsdTokenChanged(_token);
    }

    /**
     * @dev set claim open ro not
     * @param _open true or false
     */
    function setClaimOpen(bool _open) external onlyOwner {
        require(_open != claimOpen, "PE12");
        claimOpen = _open;
        emit ClaimOpenChange(_open);
    }


    /**
     * @dev withdrawERC20  tokens.
     * @param recipient recipient
     * @param tokenAddress  token
     * @param tokenAmount amount
     */
    function withdrawERC20(
        address recipient,
        address tokenAddress, 
        uint256 tokenAmount
    ) external onlyOwner notZeroAddr(tokenAddress) 
    {
        IERC20(tokenAddress).safeTransfer(recipient, tokenAmount);

        emit WithdrawERC20(recipient, tokenAddress, tokenAmount);
    }

    

    /**
     * @dev withdraw Ether.
     * @param recipient recipient
     * @param amount amount
     */
    function withdrawEther(address payable recipient, uint256 amount) external onlyOwner {
        (bool success,) = recipient.call{value:amount}("");
        require(success, "PE11");
        emit WithdrawEther(recipient, amount);
    }

    fallback () external payable {}

    receive () external payable {}


}

File 2 of 8 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `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);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 8 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

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

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

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 4 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 5 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 7 of 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 8 of 8 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pandaToken","type":"address"},{"internalType":"address","name":"_usdToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"open","type":"bool"}],"name":"ClaimOpenChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimant","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sumAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"etherAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"etherSumAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"usdSumAmount","type":"uint256"}],"name":"ClaimPanda","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"MerkleRootChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"usdToken","type":"address"}],"name":"UsdTokenChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"WithdrawERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawEther","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ZERO_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"etherAmount","type":"uint256"},{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claimPandaTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimRecord","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"etherClaimSum","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":"","type":"address"}],"name":"pandaClaimSum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pandaToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_open","type":"bool"}],"name":"setClaimOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setUsdToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalClaimEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimPanda","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimUsd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"updateMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usdClaimSum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040523480156200001157600080fd5b5060405162001a7f38038062001a7f8339810160408190526200003491620000e8565b6200003f336200007b565b6001805560609190911b6001600160601b031916608052600280546001600160a01b0319166001600160a01b0390921691909117905562000120565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b0381168114620000e357600080fd5b919050565b60008060408385031215620000fc57600080fd5b6200010783620000cb565b91506200011760208401620000cb565b90509250929050565b60805160601c6119326200014d6000396000818161042601528181610612015261090501526119326000f3fe60806040526004361061016c5760003560e01c8063715018a6116100ca578063c0bd1fc811610079578063e7caf3ae11610056578063e7caf3ae14610414578063f2fde38b14610448578063f897a22b1461046857005b8063c0bd1fc8146103b1578063c54eb994146103de578063da805590146103f457005b80638da5cb5b116100a75780638da5cb5b14610350578063b13aaebd1461036e578063bb7c61611461038457005b8063715018a6146102fb5780637273df66146103105780637cb647591461033057005b806344004cc1116101265780634bfa4063116101035780634bfa406314610298578063522f6815146102ae578063538ba4f9146102ce57005b806344004cc11461022e5780634783f0ef1461024e5780634b8bcb581461026e57005b806332d3165a1161015457806332d3165a146101be57806333a52d61146101eb5780633758502d1461020157005b80632bf09d89146101755780632eb4a7ab1461019557005b3661017357005b005b34801561018157600080fd5b5061017361019036600461176b565b610488565b3480156101a157600080fd5b506101ab60095481565b6040519081526020015b60405180910390f35b3480156101ca57600080fd5b506101ab6101d9366004611675565b60056020526000908152604090205481565b3480156101f757600080fd5b506101ab600b5481565b34801561020d57600080fd5b506101ab61021c366004611675565b60066020526000908152604090205481565b34801561023a57600080fd5b506101736102493660046116be565b610b27565b34801561025a57600080fd5b50610173610269366004611739565b610c23565b34801561027a57600080fd5b506008546102889060ff1681565b60405190151581526020016101b5565b3480156102a457600080fd5b506101ab600c5481565b3480156102ba57600080fd5b506101736102c9366004611692565b610d0b565b3480156102da57600080fd5b506102e3600081565b6040516001600160a01b0390911681526020016101b5565b34801561030757600080fd5b50610173610e51565b34801561031c57600080fd5b5061017361032b3660046116ff565b610eb7565b34801561033c57600080fd5b5061017361034b366004611739565b610fad565b34801561035c57600080fd5b506000546001600160a01b03166102e3565b34801561037a57600080fd5b506101ab60075481565b34801561039057600080fd5b506101ab61039f366004611675565b60046020526000908152604090205481565b3480156103bd57600080fd5b506101ab6103cc366004611675565b60036020526000908152604090205481565b3480156103ea57600080fd5b506101ab600a5481565b34801561040057600080fd5b5061017361040f366004611675565b611051565b34801561042057600080fd5b506102e37f000000000000000000000000000000000000000000000000000000000000000081565b34801561045457600080fd5b50610173610463366004611675565b6111a8565b34801561047457600080fd5b506002546102e3906001600160a01b031681565b600260015414156104e05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015560085460ff166105375760405162461bcd60e51b815260206004820152600360248201527f504538000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b60075433600090815260036020526040902054106105975760405162461bcd60e51b815260206004820152600360248201527f504535000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b6000836105a4868861184a565b6105ae919061184a565b116105fb5760405162461bcd60e51b815260206004820152600360248201527f504532000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b6040516370a0823160e01b815230600482015285907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561065c57600080fd5b505afa158015610670573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106949190611752565b10156106e25760405162461bcd60e51b815260206004820152600360248201527f504536000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b834710156107345760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313300000000000000000000000000000000000000000000000000000000604082015260600190565b6002546040516370a0823160e01b815230600482015284916001600160a01b0316906370a082319060240160206040518083038186803b15801561077757600080fd5b505afa15801561078b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107af9190611752565b10156107ff5760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313400000000000000000000000000000000000000000000000000000000604082015260600190565b6040516bffffffffffffffffffffffff193360601b166020820152603481018690526054810185905260748101849052600090609401604051602081830303815290604052805190602001209050600061089084848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600954915085905061128a565b9050806108df5760405162461bcd60e51b815260206004820152600360248201527f504537000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b60075433600090815260036020526040902055861561092c5761092c6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633896112a2565b85156109cc57604051600090339088908381818185875af1925050503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109ca5760405162461bcd60e51b815260206004820152600360248201527f504539000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b505b84156109e9576002546109e9906001600160a01b031633876112a2565b3360009081526004602052604081208054899290610a0890849061184a565b90915550503360009081526006602052604081208054889290610a2c90849061184a565b90915550503360009081526005602052604081208054879290610a5090849061184a565b9250508190555086600a6000828254610a69919061184a565b9250508190555085600c6000828254610a82919061184a565b9250508190555084600b6000828254610a9b919061184a565b909155505033600081815260046020908152604080832054600683528184205460058452938290205482518d8152938401919091529082018a905260608201929092526080810188905260a08101919091527f75f74c24d5caaeabcb4945378da24c304c94934be30267bf8d3a30456760706a9060c00160405180910390a25050600180555050505050565b6000546001600160a01b03163314610b815760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b816001600160a01b038116610bbe5760405162461bcd60e51b815260206004820152600360248201526250453160e81b60448201526064016104d7565b610bd26001600160a01b03841685846112a2565b604080516001600160a01b038087168252851660208201529081018390527f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb299060600160405180910390a150505050565b6000546001600160a01b03163314610c7d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b806009541415610ccf5760405162461bcd60e51b815260206004820152600360248201527f504533000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b60098190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c906020015b60405180910390a150565b6000546001600160a01b03163314610d655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610db2576040519150601f19603f3d011682016040523d82523d6000602084013e610db7565b606091505b5050905080610e0a5760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313100000000000000000000000000000000000000000000000000000000604082015260600190565b604080516001600160a01b0385168152602081018490527fdb35132c111efe920cede025e819975671cfd1b8fcc1174762c8670c4e94c211910160405180910390a1505050565b6000546001600160a01b03163314610eab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b610eb56000611327565b565b6000546001600160a01b03163314610f115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b60085460ff1615158115151415610f6c5760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313200000000000000000000000000000000000000000000000000000000604082015260600190565b6008805460ff19168215159081179091556040519081527f73b9d21fbf3df3bf67ba300b3e19e79bbcee3bc1a79a12542816f00474529f2d90602001610d00565b6000546001600160a01b031633146110075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b60098190556007805490600061101c83611892565b90915550506040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c90602001610d00565b6000546001600160a01b031633146110ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b806001600160a01b0381166110e85760405162461bcd60e51b815260206004820152600360248201526250453160e81b60448201526064016104d7565b6002546001600160a01b03838116911614156111465760405162461bcd60e51b815260206004820152600360248201527f504534000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f3d616ba89a17961c07e42c076ac0f6a0484b0fec049d950fc57595b1042086379060200160405180910390a15050565b6000546001600160a01b031633146112025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b6001600160a01b03811661127e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d7565b61128781611327565b50565b6000826112978584611384565b1490505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526113229084906113f8565b505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b84518110156113f05760008582815181106113a6576113a66118c3565b602002602001015190508083116113cc57600083815260208290526040902092506113dd565b600081815260208490526040902092505b50806113e881611892565b915050611389565b509392505050565b600061144d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114dd9092919063ffffffff16565b805190915015611322578080602001905181019061146b919061171c565b6113225760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d7565b60606114ec84846000856114f4565b949350505050565b60608247101561156c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104d7565b6001600160a01b0385163b6115c35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d7565b600080866001600160a01b031685876040516115df91906117fb565b60006040518083038185875af1925050503d806000811461161c576040519150601f19603f3d011682016040523d82523d6000602084013e611621565b606091505b509150915061163182828661163c565b979650505050505050565b6060831561164b57508161129b565b82511561165b5782518084602001fd5b8160405162461bcd60e51b81526004016104d79190611817565b60006020828403121561168757600080fd5b813561129b816118d9565b600080604083850312156116a557600080fd5b82356116b0816118d9565b946020939093013593505050565b6000806000606084860312156116d357600080fd5b83356116de816118d9565b925060208401356116ee816118d9565b929592945050506040919091013590565b60006020828403121561171157600080fd5b813561129b816118ee565b60006020828403121561172e57600080fd5b815161129b816118ee565b60006020828403121561174b57600080fd5b5035919050565b60006020828403121561176457600080fd5b5051919050565b60008060008060006080868803121561178357600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff808211156117b057600080fd5b818801915088601f8301126117c457600080fd5b8135818111156117d357600080fd5b8960208260051b85010111156117e857600080fd5b9699959850939650602001949392505050565b6000825161180d818460208701611862565b9190910192915050565b6020815260008251806020840152611836816040850160208701611862565b601f01601f19169190910160400192915050565b6000821982111561185d5761185d6118ad565b500190565b60005b8381101561187d578181015183820152602001611865565b8381111561188c576000848401525b50505050565b60006000198214156118a6576118a66118ad565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461128757600080fd5b801515811461128757600080fdfea264697066735822122032fc4a002ae03d7fcb48e126a3885b24744536ca5011af581efeb379a37ddec764736f6c634300080600330000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f

Deployed Bytecode

0x60806040526004361061016c5760003560e01c8063715018a6116100ca578063c0bd1fc811610079578063e7caf3ae11610056578063e7caf3ae14610414578063f2fde38b14610448578063f897a22b1461046857005b8063c0bd1fc8146103b1578063c54eb994146103de578063da805590146103f457005b80638da5cb5b116100a75780638da5cb5b14610350578063b13aaebd1461036e578063bb7c61611461038457005b8063715018a6146102fb5780637273df66146103105780637cb647591461033057005b806344004cc1116101265780634bfa4063116101035780634bfa406314610298578063522f6815146102ae578063538ba4f9146102ce57005b806344004cc11461022e5780634783f0ef1461024e5780634b8bcb581461026e57005b806332d3165a1161015457806332d3165a146101be57806333a52d61146101eb5780633758502d1461020157005b80632bf09d89146101755780632eb4a7ab1461019557005b3661017357005b005b34801561018157600080fd5b5061017361019036600461176b565b610488565b3480156101a157600080fd5b506101ab60095481565b6040519081526020015b60405180910390f35b3480156101ca57600080fd5b506101ab6101d9366004611675565b60056020526000908152604090205481565b3480156101f757600080fd5b506101ab600b5481565b34801561020d57600080fd5b506101ab61021c366004611675565b60066020526000908152604090205481565b34801561023a57600080fd5b506101736102493660046116be565b610b27565b34801561025a57600080fd5b50610173610269366004611739565b610c23565b34801561027a57600080fd5b506008546102889060ff1681565b60405190151581526020016101b5565b3480156102a457600080fd5b506101ab600c5481565b3480156102ba57600080fd5b506101736102c9366004611692565b610d0b565b3480156102da57600080fd5b506102e3600081565b6040516001600160a01b0390911681526020016101b5565b34801561030757600080fd5b50610173610e51565b34801561031c57600080fd5b5061017361032b3660046116ff565b610eb7565b34801561033c57600080fd5b5061017361034b366004611739565b610fad565b34801561035c57600080fd5b506000546001600160a01b03166102e3565b34801561037a57600080fd5b506101ab60075481565b34801561039057600080fd5b506101ab61039f366004611675565b60046020526000908152604090205481565b3480156103bd57600080fd5b506101ab6103cc366004611675565b60036020526000908152604090205481565b3480156103ea57600080fd5b506101ab600a5481565b34801561040057600080fd5b5061017361040f366004611675565b611051565b34801561042057600080fd5b506102e37f0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc81565b34801561045457600080fd5b50610173610463366004611675565b6111a8565b34801561047457600080fd5b506002546102e3906001600160a01b031681565b600260015414156104e05760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b600260015560085460ff166105375760405162461bcd60e51b815260206004820152600360248201527f504538000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b60075433600090815260036020526040902054106105975760405162461bcd60e51b815260206004820152600360248201527f504535000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b6000836105a4868861184a565b6105ae919061184a565b116105fb5760405162461bcd60e51b815260206004820152600360248201527f504532000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b6040516370a0823160e01b815230600482015285907f0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc6001600160a01b0316906370a082319060240160206040518083038186803b15801561065c57600080fd5b505afa158015610670573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106949190611752565b10156106e25760405162461bcd60e51b815260206004820152600360248201527f504536000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b834710156107345760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313300000000000000000000000000000000000000000000000000000000604082015260600190565b6002546040516370a0823160e01b815230600482015284916001600160a01b0316906370a082319060240160206040518083038186803b15801561077757600080fd5b505afa15801561078b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107af9190611752565b10156107ff5760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313400000000000000000000000000000000000000000000000000000000604082015260600190565b6040516bffffffffffffffffffffffff193360601b166020820152603481018690526054810185905260748101849052600090609401604051602081830303815290604052805190602001209050600061089084848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600954915085905061128a565b9050806108df5760405162461bcd60e51b815260206004820152600360248201527f504537000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b60075433600090815260036020526040902055861561092c5761092c6001600160a01b037f0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc1633896112a2565b85156109cc57604051600090339088908381818185875af1925050503d8060008114610974576040519150601f19603f3d011682016040523d82523d6000602084013e610979565b606091505b50509050806109ca5760405162461bcd60e51b815260206004820152600360248201527f504539000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b505b84156109e9576002546109e9906001600160a01b031633876112a2565b3360009081526004602052604081208054899290610a0890849061184a565b90915550503360009081526006602052604081208054889290610a2c90849061184a565b90915550503360009081526005602052604081208054879290610a5090849061184a565b9250508190555086600a6000828254610a69919061184a565b9250508190555085600c6000828254610a82919061184a565b9250508190555084600b6000828254610a9b919061184a565b909155505033600081815260046020908152604080832054600683528184205460058452938290205482518d8152938401919091529082018a905260608201929092526080810188905260a08101919091527f75f74c24d5caaeabcb4945378da24c304c94934be30267bf8d3a30456760706a9060c00160405180910390a25050600180555050505050565b6000546001600160a01b03163314610b815760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b816001600160a01b038116610bbe5760405162461bcd60e51b815260206004820152600360248201526250453160e81b60448201526064016104d7565b610bd26001600160a01b03841685846112a2565b604080516001600160a01b038087168252851660208201529081018390527f33c35f9541201e342d5e7467016e65a0a06182eb12a5f17103f71cec95b6cb299060600160405180910390a150505050565b6000546001600160a01b03163314610c7d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b806009541415610ccf5760405162461bcd60e51b815260206004820152600360248201527f504533000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b60098190556040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c906020015b60405180910390a150565b6000546001600160a01b03163314610d655760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610db2576040519150601f19603f3d011682016040523d82523d6000602084013e610db7565b606091505b5050905080610e0a5760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313100000000000000000000000000000000000000000000000000000000604082015260600190565b604080516001600160a01b0385168152602081018490527fdb35132c111efe920cede025e819975671cfd1b8fcc1174762c8670c4e94c211910160405180910390a1505050565b6000546001600160a01b03163314610eab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b610eb56000611327565b565b6000546001600160a01b03163314610f115760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b60085460ff1615158115151415610f6c5760405162461bcd60e51b81526004016104d79060208082526004908201527f5045313200000000000000000000000000000000000000000000000000000000604082015260600190565b6008805460ff19168215159081179091556040519081527f73b9d21fbf3df3bf67ba300b3e19e79bbcee3bc1a79a12542816f00474529f2d90602001610d00565b6000546001600160a01b031633146110075760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b60098190556007805490600061101c83611892565b90915550506040518181527f1b930366dfeaa7eb3b325021e4ae81e36527063452ee55b86c95f85b36f4c31c90602001610d00565b6000546001600160a01b031633146110ab5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b806001600160a01b0381166110e85760405162461bcd60e51b815260206004820152600360248201526250453160e81b60448201526064016104d7565b6002546001600160a01b03838116911614156111465760405162461bcd60e51b815260206004820152600360248201527f504534000000000000000000000000000000000000000000000000000000000060448201526064016104d7565b6002805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0384169081179091556040519081527f3d616ba89a17961c07e42c076ac0f6a0484b0fec049d950fc57595b1042086379060200160405180910390a15050565b6000546001600160a01b031633146112025760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d7565b6001600160a01b03811661127e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d7565b61128781611327565b50565b6000826112978584611384565b1490505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790526113229084906113f8565b505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b84518110156113f05760008582815181106113a6576113a66118c3565b602002602001015190508083116113cc57600083815260208290526040902092506113dd565b600081815260208490526040902092505b50806113e881611892565b915050611389565b509392505050565b600061144d826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114dd9092919063ffffffff16565b805190915015611322578080602001905181019061146b919061171c565b6113225760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016104d7565b60606114ec84846000856114f4565b949350505050565b60608247101561156c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016104d7565b6001600160a01b0385163b6115c35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104d7565b600080866001600160a01b031685876040516115df91906117fb565b60006040518083038185875af1925050503d806000811461161c576040519150601f19603f3d011682016040523d82523d6000602084013e611621565b606091505b509150915061163182828661163c565b979650505050505050565b6060831561164b57508161129b565b82511561165b5782518084602001fd5b8160405162461bcd60e51b81526004016104d79190611817565b60006020828403121561168757600080fd5b813561129b816118d9565b600080604083850312156116a557600080fd5b82356116b0816118d9565b946020939093013593505050565b6000806000606084860312156116d357600080fd5b83356116de816118d9565b925060208401356116ee816118d9565b929592945050506040919091013590565b60006020828403121561171157600080fd5b813561129b816118ee565b60006020828403121561172e57600080fd5b815161129b816118ee565b60006020828403121561174b57600080fd5b5035919050565b60006020828403121561176457600080fd5b5051919050565b60008060008060006080868803121561178357600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff808211156117b057600080fd5b818801915088601f8301126117c457600080fd5b8135818111156117d357600080fd5b8960208260051b85010111156117e857600080fd5b9699959850939650602001949392505050565b6000825161180d818460208701611862565b9190910192915050565b6020815260008251806020840152611836816040850160208701611862565b601f01601f19169190910160400192915050565b6000821982111561185d5761185d6118ad565b500190565b60005b8381101561187d578181015183820152602001611865565b8381111561188c576000848401525b50505050565b60006000198214156118a6576118a66118ad565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038116811461128757600080fd5b801515811461128757600080fdfea264697066735822122032fc4a002ae03d7fcb48e126a3885b24744536ca5011af581efeb379a37ddec764736f6c63430008060033

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

0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f

-----Decoded View---------------
Arg [0] : _pandaToken (address): 0x3cBb7f5d7499Af626026E96a2f05df806F2200DC
Arg [1] : _usdToken (address): 0x6B175474E89094C44Da98b954EedeAC495271d0F

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000003cbb7f5d7499af626026e96a2f05df806f2200dc
Arg [1] : 0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f


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  ]
[ 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.