false
false
0

Contract Address Details

0xb52Fa2153F2cFD02CFF545c55479f3D5cd73292e

Contract Name
MerkledropToStaking
Creator
0x5294eb–a1417a at 0xd952be–6b7fb8
Balance
0 C2FLR
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
11524823
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
MerkledropToStaking




Optimization enabled
true
Compiler version
v0.8.15+commit.e14f2714




Optimization runs
2000
Verified at
2023-01-13T06:40:47.289319Z

Constructor Arguments

0000000000000000000000006169cd307be7e24152df23a7a945a1ea3ec7b438000000000000000000000000dd1a0e81496bb29fe8f8917ff1a8a50b45194ac20000000000000000000000005294eb1736e928cad0b261067354280d07a1417a

Arg [0] (address) : 0x6169cd307be7e24152df23a7a945a1ea3ec7b438
Arg [1] (address) : 0xdd1a0e81496bb29fe8f8917ff1a8a50b45194ac2
Arg [2] (address) : 0x5294eb1736e928cad0b261067354280d07a1417a

              

contracts/pangolin-token/MerkledropToStaking.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

interface IPangolinStakingPositions is IERC721 {
    function mint(uint256 amount) external returns (uint256 positionId);
}

contract MerkledropToStaking is Ownable, Pausable {
    mapping(address => uint96) public claimedAmounts;
    IERC20 public immutable PNG;
    IPangolinStakingPositions public immutable SAR;
    bytes32 public merkleRoot;

    event Claimed(address indexed from, address indexed to, uint96 indexed amount);
    event MerkleRootSet(bytes32 indexed newMerkleRoot);

    constructor(address airdropToken, address stakingPositions, address initialOwner) {
        require(airdropToken.code.length != 0, "invalid token address");
        require(stakingPositions.code.length != 0, "invalid staking address");
        require(initialOwner != address(0), "invalid initial owner");
        _transferOwnership(initialOwner);
        IERC20(airdropToken).approve(stakingPositions, type(uint256).max);
        PNG = IERC20(airdropToken);
        SAR = IPangolinStakingPositions(stakingPositions);
        _pause();
    }

    function claim(uint96 amount, bytes32[] calldata merkleProof) external {
        claimTo(msg.sender, amount, merkleProof);
    }

    function claimTo(
        address to,
        uint96 amount,
        bytes32[] calldata merkleProof
    ) public whenNotPaused {
        uint96 previouslyClaimed = claimedAmounts[msg.sender];
        require(previouslyClaimed < amount, "nothing to claim");
        bytes32 node = bytes32(abi.encodePacked(msg.sender, amount));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), "invalid proof");
        claimedAmounts[msg.sender] = amount;
        unchecked {
            amount -= previouslyClaimed;
        }
        uint256 positionId = SAR.mint(amount);
        SAR.safeTransferFrom(address(this), to, positionId);
        emit Claimed(msg.sender, to, amount);
    }

    function setMerkleRoot(bytes32 newMerkleRoot) external whenPaused onlyOwner {
        merkleRoot = newMerkleRoot;
        emit MerkleRootSet(newMerkleRoot);
    }

    function recover(IERC20 token, uint256 amount) external whenPaused onlyOwner {
        require(token.transfer(msg.sender, amount), "transfer failed");
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        require(merkleRoot != 0x00, "merkle root not set");
        _unpause();
    }
}
        

@openzeppelin/contracts/access/Ownable.sol

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

@openzeppelin/contracts/security/Pausable.sol

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

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

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

@openzeppelin/contracts/token/ERC20/IERC20.sol

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

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

@openzeppelin/contracts/token/ERC721/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);
}
          

@openzeppelin/contracts/utils/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;
    }
}
          

@openzeppelin/contracts/utils/cryptography/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)
        }
    }
}
          

@openzeppelin/contracts/utils/introspection/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);
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"airdropToken","internalType":"address"},{"type":"address","name":"stakingPositions","internalType":"address"},{"type":"address","name":"initialOwner","internalType":"address"}]},{"type":"event","name":"Claimed","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint96","name":"amount","internalType":"uint96","indexed":true}],"anonymous":false},{"type":"event","name":"MerkleRootSet","inputs":[{"type":"bytes32","name":"newMerkleRoot","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"PNG","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IPangolinStakingPositions"}],"name":"SAR","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[{"type":"uint96","name":"amount","internalType":"uint96"},{"type":"bytes32[]","name":"merkleProof","internalType":"bytes32[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimTo","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint96","name":"amount","internalType":"uint96"},{"type":"bytes32[]","name":"merkleProof","internalType":"bytes32[]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint96","name":"","internalType":"uint96"}],"name":"claimedAmounts","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"merkleRoot","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"recover","inputs":[{"type":"address","name":"token","internalType":"contract IERC20"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMerkleRoot","inputs":[{"type":"bytes32","name":"newMerkleRoot","internalType":"bytes32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]}]
              

Contract Creation Code

0x60c06040523480156200001157600080fd5b506040516200115138038062001151833981016040819052620000349162000330565b6200003f3362000208565b6000805460ff60a01b191681556001600160a01b0384163b9003620000ab5760405162461bcd60e51b815260206004820152601560248201527f696e76616c696420746f6b656e2061646472657373000000000000000000000060448201526064015b60405180910390fd5b816001600160a01b03163b600003620001075760405162461bcd60e51b815260206004820152601760248201527f696e76616c6964207374616b696e6720616464726573730000000000000000006044820152606401620000a2565b6001600160a01b0381166200015f5760405162461bcd60e51b815260206004820152601560248201527f696e76616c696420696e697469616c206f776e657200000000000000000000006044820152606401620000a2565b6200016a8162000208565b60405163095ea7b360e01b81526001600160a01b038381166004830152600019602483015284169063095ea7b3906044016020604051808303816000875af1158015620001bb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e191906200037a565b506001600160a01b03808416608052821660a052620001ff62000258565b505050620003a5565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b62000262620002bb565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586200029e3390565b6040516001600160a01b03909116815260200160405180910390a1565b620002cf600054600160a01b900460ff1690565b15620003115760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401620000a2565b565b80516001600160a01b03811681146200032b57600080fd5b919050565b6000806000606084860312156200034657600080fd5b620003518462000313565b9250620003616020850162000313565b9150620003716040850162000313565b90509250925092565b6000602082840312156200038d57600080fd5b815180151581146200039e57600080fd5b9392505050565b60805160a051610d78620003d9600039600081816101100152818161060c01526106c10152600061021b0152610d786000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637cb647591161008c57806391a862fa1161006657806391a862fa146102035780639bab65b814610216578063d8ef8ad41461023d578063f2fde38b1461025057600080fd5b80637cb64759146101d75780638456cb59146101ea5780638da5cb5b146101f257600080fd5b80635705ae43116100c85780635705ae43146101545780635c975abb1461016757806371417b3214610184578063715018a6146101cf57600080fd5b80632eb4a7ab146100ef57806333c88ff61461010b5780633f4ba83a1461014a575b600080fd5b6100f860025481565b6040519081526020015b60405180910390f35b6101327f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610102565b610152610263565b005b610152610162366004610aeb565b6102cc565b600054600160a01b900460ff166040519015158152602001610102565b6101b2610192366004610b17565b6001602052600090815260409020546bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff9091168152602001610102565b6101526103b6565b6101526101e5366004610b34565b6103c8565b61015261040b565b6000546001600160a01b0316610132565b610152610211366004610bba565b61041b565b6101327f000000000000000000000000000000000000000000000000000000000000000081565b61015261024b366004610c0d565b61042c565b61015261025e366004610b17565b61076e565b61026b6107fe565b6002546000036102c25760405162461bcd60e51b815260206004820152601360248201527f6d65726b6c6520726f6f74206e6f74207365740000000000000000000000000060448201526064015b60405180910390fd5b6102ca610858565b565b6102d46108c8565b6102dc6107fe565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103669190610c70565b6103b25760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c6564000000000000000000000000000000000060448201526064016102b9565b5050565b6103be6107fe565b6102ca6000610921565b6103d06108c8565b6103d86107fe565b600281905560405181907f42cbc405e4dbf1b691e85b9a34b08ecfcf7a9ad9078bf4d645ccfa1fac11c10b90600090a250565b6104136107fe565b6102ca610989565b6104273384848461042c565b505050565b6104346109e7565b336000908152600160205260409020546bffffffffffffffffffffffff90811690841681106104a55760405162461bcd60e51b815260206004820152601060248201527f6e6f7468696e6720746f20636c61696d0000000000000000000000000000000060448201526064016102b9565b604080516bffffffffffffffffffffffff193360601b1660208201527fffffffffffffffffffffffff000000000000000000000000000000000000000060a087901b1660348201526000910160405160208183030381529060405261050990610c92565b905061054c848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610a41565b6105985760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642070726f6f660000000000000000000000000000000000000060448201526064016102b9565b3360009081526001602052604080822080546bffffffffffffffffffffffff19166bffffffffffffffffffffffff8981169190911790915590517fa0712d68000000000000000000000000000000000000000000000000000000008152968490039081166004880152956001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a0712d68906024016020604051808303816000875af1158015610655573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106799190610cb9565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038981166024830152604482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906342842e0e90606401600060405180830381600087803b15801561070757600080fd5b505af115801561071b573d6000803e3d6000fd5b50506040516bffffffffffffffffffffffff891692506001600160a01b038a16915033907ff9ddf109eb32ae61850b998bb6a5bfbcb1b0d513ab98d1f98d5ff43d977b9ab790600090a450505050505050565b6107766107fe565b6001600160a01b0381166107f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102b9565b6107fb81610921565b50565b6000546001600160a01b031633146102ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102b9565b6108606108c8565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff166102ca5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016102b9565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109916109e7565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586108ab3390565b600054600160a01b900460ff16156102ca5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016102b9565b600082610a4e8584610a57565b14949350505050565b600081815b8451811015610a9c57610a8882868381518110610a7b57610a7b610cd2565b6020026020010151610aa4565b915080610a9481610d01565b915050610a5c565b509392505050565b6000818310610ac0576000828152602084905260409020610acf565b60008381526020839052604090205b9392505050565b6001600160a01b03811681146107fb57600080fd5b60008060408385031215610afe57600080fd5b8235610b0981610ad6565b946020939093013593505050565b600060208284031215610b2957600080fd5b8135610acf81610ad6565b600060208284031215610b4657600080fd5b5035919050565b80356bffffffffffffffffffffffff81168114610b6957600080fd5b919050565b60008083601f840112610b8057600080fd5b50813567ffffffffffffffff811115610b9857600080fd5b6020830191508360208260051b8501011115610bb357600080fd5b9250929050565b600080600060408486031215610bcf57600080fd5b610bd884610b4d565b9250602084013567ffffffffffffffff811115610bf457600080fd5b610c0086828701610b6e565b9497909650939450505050565b60008060008060608587031215610c2357600080fd5b8435610c2e81610ad6565b9350610c3c60208601610b4d565b9250604085013567ffffffffffffffff811115610c5857600080fd5b610c6487828801610b6e565b95989497509550505050565b600060208284031215610c8257600080fd5b81518015158114610acf57600080fd5b80516020808301519190811015610cb3576000198160200360031b1b821691505b50919050565b600060208284031215610ccb57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006000198203610d3b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220a0c49e14f5fbb93a2d91a92468ed852f2c6944d568f6dedb15b2736f1e09900164736f6c634300080f00330000000000000000000000006169cd307be7e24152df23a7a945a1ea3ec7b438000000000000000000000000dd1a0e81496bb29fe8f8917ff1a8a50b45194ac20000000000000000000000005294eb1736e928cad0b261067354280d07a1417a

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637cb647591161008c57806391a862fa1161006657806391a862fa146102035780639bab65b814610216578063d8ef8ad41461023d578063f2fde38b1461025057600080fd5b80637cb64759146101d75780638456cb59146101ea5780638da5cb5b146101f257600080fd5b80635705ae43116100c85780635705ae43146101545780635c975abb1461016757806371417b3214610184578063715018a6146101cf57600080fd5b80632eb4a7ab146100ef57806333c88ff61461010b5780633f4ba83a1461014a575b600080fd5b6100f860025481565b6040519081526020015b60405180910390f35b6101327f000000000000000000000000dd1a0e81496bb29fe8f8917ff1a8a50b45194ac281565b6040516001600160a01b039091168152602001610102565b610152610263565b005b610152610162366004610aeb565b6102cc565b600054600160a01b900460ff166040519015158152602001610102565b6101b2610192366004610b17565b6001602052600090815260409020546bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff9091168152602001610102565b6101526103b6565b6101526101e5366004610b34565b6103c8565b61015261040b565b6000546001600160a01b0316610132565b610152610211366004610bba565b61041b565b6101327f0000000000000000000000006169cd307be7e24152df23a7a945a1ea3ec7b43881565b61015261024b366004610c0d565b61042c565b61015261025e366004610b17565b61076e565b61026b6107fe565b6002546000036102c25760405162461bcd60e51b815260206004820152601360248201527f6d65726b6c6520726f6f74206e6f74207365740000000000000000000000000060448201526064015b60405180910390fd5b6102ca610858565b565b6102d46108c8565b6102dc6107fe565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015610342573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103669190610c70565b6103b25760405162461bcd60e51b815260206004820152600f60248201527f7472616e73666572206661696c6564000000000000000000000000000000000060448201526064016102b9565b5050565b6103be6107fe565b6102ca6000610921565b6103d06108c8565b6103d86107fe565b600281905560405181907f42cbc405e4dbf1b691e85b9a34b08ecfcf7a9ad9078bf4d645ccfa1fac11c10b90600090a250565b6104136107fe565b6102ca610989565b6104273384848461042c565b505050565b6104346109e7565b336000908152600160205260409020546bffffffffffffffffffffffff90811690841681106104a55760405162461bcd60e51b815260206004820152601060248201527f6e6f7468696e6720746f20636c61696d0000000000000000000000000000000060448201526064016102b9565b604080516bffffffffffffffffffffffff193360601b1660208201527fffffffffffffffffffffffff000000000000000000000000000000000000000060a087901b1660348201526000910160405160208183030381529060405261050990610c92565b905061054c848480806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610a41565b6105985760405162461bcd60e51b815260206004820152600d60248201527f696e76616c69642070726f6f660000000000000000000000000000000000000060448201526064016102b9565b3360009081526001602052604080822080546bffffffffffffffffffffffff19166bffffffffffffffffffffffff8981169190911790915590517fa0712d68000000000000000000000000000000000000000000000000000000008152968490039081166004880152956001600160a01b037f000000000000000000000000dd1a0e81496bb29fe8f8917ff1a8a50b45194ac2169063a0712d68906024016020604051808303816000875af1158015610655573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106799190610cb9565b6040517f42842e0e0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b038981166024830152604482018390529192507f000000000000000000000000dd1a0e81496bb29fe8f8917ff1a8a50b45194ac2909116906342842e0e90606401600060405180830381600087803b15801561070757600080fd5b505af115801561071b573d6000803e3d6000fd5b50506040516bffffffffffffffffffffffff891692506001600160a01b038a16915033907ff9ddf109eb32ae61850b998bb6a5bfbcb1b0d513ab98d1f98d5ff43d977b9ab790600090a450505050505050565b6107766107fe565b6001600160a01b0381166107f25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102b9565b6107fb81610921565b50565b6000546001600160a01b031633146102ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102b9565b6108606108c8565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff166102ca5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016102b9565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109916109e7565b600080547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586108ab3390565b600054600160a01b900460ff16156102ca5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016102b9565b600082610a4e8584610a57565b14949350505050565b600081815b8451811015610a9c57610a8882868381518110610a7b57610a7b610cd2565b6020026020010151610aa4565b915080610a9481610d01565b915050610a5c565b509392505050565b6000818310610ac0576000828152602084905260409020610acf565b60008381526020839052604090205b9392505050565b6001600160a01b03811681146107fb57600080fd5b60008060408385031215610afe57600080fd5b8235610b0981610ad6565b946020939093013593505050565b600060208284031215610b2957600080fd5b8135610acf81610ad6565b600060208284031215610b4657600080fd5b5035919050565b80356bffffffffffffffffffffffff81168114610b6957600080fd5b919050565b60008083601f840112610b8057600080fd5b50813567ffffffffffffffff811115610b9857600080fd5b6020830191508360208260051b8501011115610bb357600080fd5b9250929050565b600080600060408486031215610bcf57600080fd5b610bd884610b4d565b9250602084013567ffffffffffffffff811115610bf457600080fd5b610c0086828701610b6e565b9497909650939450505050565b60008060008060608587031215610c2357600080fd5b8435610c2e81610ad6565b9350610c3c60208601610b4d565b9250604085013567ffffffffffffffff811115610c5857600080fd5b610c6487828801610b6e565b95989497509550505050565b600060208284031215610c8257600080fd5b81518015158114610acf57600080fd5b80516020808301519190811015610cb3576000198160200360031b1b821691505b50919050565b600060208284031215610ccb57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60006000198203610d3b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220a0c49e14f5fbb93a2d91a92468ed852f2c6944d568f6dedb15b2736f1e09900164736f6c634300080f0033